Update Piston to 0.4.0 for bugfixes

This commit is contained in:
Kenzie Togami 2019-06-01 01:51:06 -07:00
parent 38607f387a
commit 620992dd57
No known key found for this signature in database
GPG Key ID: 5D200B325E157A81
2 changed files with 6 additions and 4 deletions

View File

@ -22,6 +22,7 @@ package com.sk89q.worldedit.command.util;
import com.sk89q.worldedit.extension.platform.Actor;
import org.enginehub.piston.Command;
import org.enginehub.piston.CommandParameters;
import org.enginehub.piston.inject.InjectedValueAccess;
import org.enginehub.piston.inject.Key;
import java.util.Set;
@ -41,8 +42,8 @@ public final class PermissionCondition implements Command.Condition {
}
@Override
public boolean satisfied(CommandParameters parameters) {
return parameters.injectedValue(ACTOR_KEY)
public boolean satisfied(InjectedValueAccess context) {
return context.injectedValue(ACTOR_KEY)
.map(actor -> permissions.stream().anyMatch(actor::hasPermission))
.orElse(false);
}

View File

@ -90,13 +90,14 @@ configure(subprojects + project("core:ap")) {
def textExtrasVersion = "3.0.2"
project("core") {
def textVersion = "3.0.0"
def pistonVersion = '0.3.0'
def textVersion = "3.0.1"
def pistonVersion = '0.4.0'
dependencies {
shade "net.kyori:text-api:$textVersion"
shade "net.kyori:text-serializer-gson:$textVersion"
shade "net.kyori:text-serializer-legacy:$textVersion"
shade "net.kyori:text-serializer-plain:$textVersion"
shade('com.sk89q:jchronic:0.2.4a') {
exclude(group: "junit", module: "junit")
}