Class ConfigKeyValueArgument<A,V,N extends org.core.config.ConfigurationNode.KnownParser<String,V>>

java.lang.Object
org.ships.commands.argument.arguments.config.ConfigKeyValueArgument<A,V,N>
All Implemented Interfaces:
org.core.command.argument.CommandArgument<V>, org.core.command.argument.ParseCommandArgument<V>, org.core.command.argument.SuggestCommandArgument<V>

public class ConfigKeyValueArgument<A,V,N extends org.core.config.ConfigurationNode.KnownParser<String,V>> extends Object implements org.core.command.argument.CommandArgument<V>
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConfigKeyValueArgument(String id, org.core.command.argument.ParseCommandArgument<? extends DedicatedNode<A,V,N>> supplier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    org.core.command.argument.CommandArgumentResult<V>
    parse(org.core.command.argument.context.CommandContext context, org.core.command.argument.context.CommandArgumentContext<V> argument)
     
    suggest(org.core.command.argument.context.CommandContext context, org.core.command.argument.context.CommandArgumentContext<V> argument)
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.core.command.argument.CommandArgument

    getUsage

    Methods inherited from interface org.core.command.argument.SuggestCommandArgument

    errorMessage
  • Constructor Details

    • ConfigKeyValueArgument

      public ConfigKeyValueArgument(String id, org.core.command.argument.ParseCommandArgument<? extends DedicatedNode<A,V,N>> supplier)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface org.core.command.argument.CommandArgument<A>
    • parse

      public org.core.command.argument.CommandArgumentResult<V> parse(org.core.command.argument.context.CommandContext context, org.core.command.argument.context.CommandArgumentContext<V> argument) throws IOException
      Specified by:
      parse in interface org.core.command.argument.ParseCommandArgument<A>
      Throws:
      IOException
    • suggest

      public List<String> suggest(org.core.command.argument.context.CommandContext context, org.core.command.argument.context.CommandArgumentContext<V> argument) throws org.core.exceptions.NotEnoughArguments
      Specified by:
      suggest in interface org.core.command.argument.SuggestCommandArgument<A>
      Throws:
      org.core.exceptions.NotEnoughArguments