Update Piston to 0.4.0 for bugfixes

Dieser Commit ist enthalten in:
Kenzie Togami 2019-06-01 01:51:06 -07:00
Ursprung 38607f387a
Commit 620992dd57
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 5D200B325E157A81
2 geänderte Dateien mit 6 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -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);
}

Datei anzeigen

@ -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")
}