Class EnumArgument<E extends Enum<E>>

java.lang.Object
com.github.darksoulq.abyssallib.server.command.argument.EnumArgument<E>
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<E>, io.papermc.paper.command.brigadier.argument.CustomArgumentType<E,String>

public class EnumArgument<E extends Enum<E>> extends Object implements io.papermc.paper.command.brigadier.argument.CustomArgumentType<E,String>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.papermc.paper.command.brigadier.argument.CustomArgumentType

    io.papermc.paper.command.brigadier.argument.CustomArgumentType.Converted<T,N>
  • Method Summary

    Modifier and Type
    Method
    Description
    static <E extends Enum<E>>
    EnumArgument<E>
    enumArg(Class<E> enumClass)
     
    com.mojang.brigadier.arguments.ArgumentType<String>
     
    <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
    listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
     
    parse(com.mojang.brigadier.StringReader reader)
     

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.papermc.paper.command.brigadier.argument.CustomArgumentType

    getExamples, parse
  • Method Details

    • enumArg

      public static <E extends Enum<E>> EnumArgument<E> enumArg(Class<E> enumClass)
    • parse

      public E parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<E extends Enum<E>>
      Specified by:
      parse in interface io.papermc.paper.command.brigadier.argument.CustomArgumentType<E extends Enum<E>, String>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getNativeType

      public com.mojang.brigadier.arguments.ArgumentType<String> getNativeType()
      Specified by:
      getNativeType in interface io.papermc.paper.command.brigadier.argument.CustomArgumentType<E extends Enum<E>, String>
    • listSuggestions

      public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
      Specified by:
      listSuggestions in interface com.mojang.brigadier.arguments.ArgumentType<E extends Enum<E>>
      Specified by:
      listSuggestions in interface io.papermc.paper.command.brigadier.argument.CustomArgumentType<E extends Enum<E>, String>