Interface Context

All Known Implementing Classes:
Contexts

@NullMarked public interface Context
A context that can be registered to the ContextManager.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the context name, without any namespacing.
    Gets the namespace for this context.
    default String
    Gets the context name with namespace.
    Gets known possible values for the context.
    getValues(org.bukkit.entity.Player player)
    Gets the values for a given player at this moment in time.
  • Method Details

    • getName

      String getName()
      Gets the context name, without any namespacing. Format should be lowercase words separated by hyphens (-).
      Returns:
      name
    • getNamespace

      String getNamespace()
      Gets the namespace for this context. Namespaces should be the plugin name, lowercased. Other plugins using this class should not use factionsuuid as their namespace.
      Returns:
      namespace
    • getNamespacedName

      default String getNamespacedName()
      Gets the context name with namespace. The format is namespace:name.
      Returns:
      namespaced name
    • getPossibleValues

      Set<String> getPossibleValues()
      Gets known possible values for the context.
      Returns:
      immutable set of possible values
    • getValues

      Set<String> getValues(org.bukkit.entity.Player player)
      Gets the values for a given player at this moment in time.
      Parameters:
      player - player
      Returns:
      immutable set of current values