Class Context

java.lang.Object
net.orbyfied.j8.command.Context

public class Context extends Object
  • Field Details

    • sender

      protected final org.bukkit.command.CommandSender sender
      The sender of the command.
    • destiny

      protected Context.Destiny destiny
      The purspose of this invocation.
    • rootCommand

      protected Node rootCommand
      The root command node.
    • symbols

      protected final HashMap<net.orbyfied.j8.registry.Identifier,Object> symbols
      The list of arguments, parameters and symbols.
    • options

      protected final HashMap<net.orbyfied.j8.registry.Identifier,Object> options
      Options usable in parsing.
    • engine

      protected final CommandEngine engine
      The command engine.
    • intermediateText

      protected String intermediateText
      The intermediate status text.
    • canFormat

      protected boolean canFormat
      If the text can be formatted.
    • successful

      protected Boolean successful
      If the invocation was successful.
    • reader

      protected net.orbyfied.j8.util.StringReader reader
      The current string reader used for parsing.
    • current

      protected Node current
      The current node we are at.
    • currentExecutable

      protected Executable currentExecutable
      The last/current executable node.
    • flags

      protected List<Flag<?>> flags
      All flags registered.
    • flagsByName

      protected Map<String,Flag<?>> flagsByName
      All registered flags by name.
    • flagsByChar

      protected Map<Character,Flag<?>> flagsByChar
      All one-char-able flags by character.
    • flagValues

      protected Map<Flag<?>,Object> flagValues
      The flag values.
  • Constructor Details

    • Context

      public Context(CommandEngine engine, org.bukkit.command.CommandSender sender)
  • Method Details

    • canFormat

      public Context canFormat(boolean canFormat)
    • engine

      public CommandEngine engine()
    • sender

      public org.bukkit.command.CommandSender sender()
    • destiny

      public Context.Destiny destiny()
    • intermediateText

      public String intermediateText()
    • intermediateText

      public Context intermediateText(String text)
    • successful

      public Context successful(boolean b)
    • successful

      public Boolean successful()
    • destiny

      public Context destiny(Context.Destiny destiny)
    • rootCommand

      public Node rootCommand()
    • reader

      public net.orbyfied.j8.util.StringReader reader()
    • currentExecutable

      public Executable currentExecutable()
    • currentNode

      public Node currentNode()
    • getSymbols

      public HashMap<net.orbyfied.j8.registry.Identifier,Object> getSymbols()
    • getSymbol

      public <T> T getSymbol(net.orbyfied.j8.registry.Identifier identifier)
    • getSymbol

      public <T> T getSymbol(String id)
    • getSymbol

      public <T> T getSymbol(net.orbyfied.j8.registry.Identifier identifier, Class<T> tClass)
    • getSymbol

      public <T> T getSymbol(String id, Class<T> tClass)
    • setSymbol

      public Context setSymbol(net.orbyfied.j8.registry.Identifier id, Object o)
    • setSymbol

      public Context setSymbol(String id, Object o)
    • unsetSymbol

      public Context unsetSymbol(net.orbyfied.j8.registry.Identifier id)
    • unsetSymbol

      public Context unsetSymbol(String id)
    • getOptions

      public HashMap<net.orbyfied.j8.registry.Identifier,Object> getOptions()
    • getLocalOption

      public <T> Optional<T> getLocalOption(String identifier, Class<T> tClass)
    • getLocalOption

      public <T> Optional<T> getLocalOption(String identifier)
    • setLocalOption

      public Context setLocalOption(String identifier, Object o)
    • unsetLocalOption

      public Context unsetLocalOption(String identifier)
    • getOption

      public <T> Optional<T> getOption(net.orbyfied.j8.registry.Identifier identifier)
    • getOption

      public <T> Optional<T> getOption(String identifier)
    • setOption

      public Context setOption(net.orbyfied.j8.registry.Identifier identifier, Object o)
    • setOption

      public Context setOption(String id, Object o)
    • unsetOption

      public Context unsetOption(net.orbyfied.j8.registry.Identifier id)
    • unsetOption

      public Context unsetOption(String id)
    • pushFlag

      public Context pushFlag(Flag<?> flag)
    • getFlags

      public List<Flag<?>> getFlags()
    • getFlagByName

      public Flag<?> getFlagByName(String name)
    • getFlagByCharacter

      public Flag<?> getFlagByCharacter(char c)
    • getFlagValue

      public <T> T getFlagValue(Flag<T> flag)
    • getFlagValue

      public <T> T getFlagValue(String name)
    • getFlagValue

      public <T> T getFlagValue(String name, Class<T> tClass)
    • getFlagValue

      public <T> T getFlagValue(Flag<?> flag, T ifUnset)
    • getFlagValue

      public <T> T getFlagValue(Flag<?> flag, Class<T> tClass, T ifUnset)
    • getFlagValue

      public <T> T getFlagValue(String name, Class<T> tClass, T ifUnset)