Class ContextProvider

java.lang.Object
me.totalfreedom.provider.ContextProvider

public class ContextProvider extends Object
This class is used to provide context to subcommand methods. This class is used by the BukkitDelegate to parse arguments for subcommands. The following types are supported:
  • Boolean
  • Double
  • Integer
  • Long
  • Float
  • Material
  • Player
  • World
  • Location
  • CommandSender
  • Component
All of these types can be parsed from a String input. If the String cannot be parsed into any of these types, then null will be returned.
See Also:
  • Constructor Details

    • ContextProvider

      public ContextProvider()
  • Method Details

    • fromString

      public <T> T fromString(String string, Class<T> clazz)