Class AbstractDirectionConverter<D>
java.lang.Object
com.sk89q.worldedit.command.argument.AbstractDirectionConverter<D>
- All Implemented Interfaces:
org.enginehub.piston.converter.ArgumentConverter<D>
,org.enginehub.piston.converter.Converter<D>
,org.enginehub.piston.converter.SuggestionProvider
- Direct Known Subclasses:
DirectionConverter
,DirectionVectorConverter
public abstract class AbstractDirectionConverter<D>
extends Object
implements org.enginehub.piston.converter.ArgumentConverter<D>
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractDirectionConverter
(WorldEdit worldEdit, boolean includeDiagonals) -
Method Summary
Modifier and TypeMethodDescriptionorg.enginehub.piston.converter.ConversionResult
<D> protected abstract D
convertDirection
(String argument, Player player, boolean includeDiagonals) com.sk89q.worldedit.util.formatting.text.Component
getSuggestions
(String input, org.enginehub.piston.inject.InjectedValueAccess context) protected WorldEdit
protected static <D> void
register
(org.enginehub.piston.CommandManager commandManager, AbstractDirectionConverter<D> converter, Class<D> keyClass, boolean includeDiagonals)
-
Constructor Details
-
AbstractDirectionConverter
-
-
Method Details
-
register
protected static <D> void register(org.enginehub.piston.CommandManager commandManager, AbstractDirectionConverter<D> converter, Class<D> keyClass, boolean includeDiagonals) -
convert
public org.enginehub.piston.converter.ConversionResult<D> convert(String argument, org.enginehub.piston.inject.InjectedValueAccess context) - Specified by:
convert
in interfaceorg.enginehub.piston.converter.Converter<D>
-
convertDirection
protected abstract D convertDirection(String argument, @Nullable Player player, boolean includeDiagonals) throws UnknownDirectionException - Throws:
UnknownDirectionException
-
describeAcceptableArguments
public com.sk89q.worldedit.util.formatting.text.Component describeAcceptableArguments()- Specified by:
describeAcceptableArguments
in interfaceorg.enginehub.piston.converter.ArgumentConverter<D>
-
getSuggestions
public List<String> getSuggestions(String input, org.enginehub.piston.inject.InjectedValueAccess context) - Specified by:
getSuggestions
in interfaceorg.enginehub.piston.converter.ArgumentConverter<D>
- Specified by:
getSuggestions
in interfaceorg.enginehub.piston.converter.SuggestionProvider
-
getWorldEdit
-