Dieser Commit ist enthalten in:
IronApollo 2020-09-07 21:45:05 -04:00
Commit 7929320611
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -47,7 +47,7 @@ jobs:
- name: Download BuildTools
run: wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
- name: Run BuildTools
run: java -jar BuildTools.jar --rev latest
run: java -jar BuildTools.jar --rev 1.16.2
- name: Test with Gradle
run: ./gradlew clean build -x test
run: ./gradlew clean build sourcesJar javadocJar

Datei anzeigen

@ -27,7 +27,7 @@ You can safely ignore `gradlew setupDecompWorkspace` if you are not planning to
```
$ gradlew setupDecompWorkspace
$ gradlew clean build -x test
$ gradlew build
```
The jar is located in `worldedit-bukkit/build/libs/FastAsyncWorldEdit-1.16-###.jar`

Datei anzeigen

@ -25,6 +25,7 @@ import com.google.common.collect.ImmutableSet;
import com.sk89q.worldedit.UnknownDirectionException;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.internal.annotation.Direction;
import com.sk89q.worldedit.internal.annotation.MultiDirection;
import com.sk89q.worldedit.internal.annotation.OptionalArg;
@ -93,8 +94,7 @@ public abstract class AbstractDirectionConverter<D> implements ArgumentConverter
@Override
public ConversionResult<D> convert(String argument, InjectedValueAccess context) {
Player player = context.injectedValue(Key.of(Player.class, OptionalArg.class))
.orElse(null);
Player player = context.injectedValue(Key.of(Actor.class)).filter(Player.class::isInstance).map(Player.class::cast).orElse(null);
try {
return SuccessfulConversion.fromSingle(convertDirection(argument, player, includeDiagonals));
} catch (Exception e) {