mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-07-05 16:40:04 +00:00
17 lines
515 B
Java
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);
|
|
}
|
|
|
|
}
|