Plex-FAWE/worldedit-core/src/main/java/com/sk89q/worldedit/command/MethodCommands.java
MattBDev 7963b2c92f Removed commands.yml
I also did a few renames as well as a command registration fix.
2019-07-26 19:23:24 -04:00

17 lines
515 B
Java

package com.sk89q.worldedit.command;
import com.sk89q.worldedit.command.argument.Arguments;
import java.util.Optional;
import org.enginehub.piston.inject.InjectedValueAccess;
import org.enginehub.piston.inject.Key;
public class MethodCommands {
public static String getArguments(InjectedValueAccess context) {
if (context == null) return null;
Optional<Arguments> arguments = context.injectedValue(Key.of(Arguments.class));
return arguments.map(Arguments::get).orElse(null);
}
}