Interface Property


public interface Property
An interface representing a property assigned to a player, which may contain placeholders and can be changed using the API.
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Returns last known value
    Returns temporary value (via API) if present, raw value otherwise
    Returns value for defined viewer by applying relational placeholders to last known value
    Returns original raw value ignoring API calls
    Returns current temporary value
    void
    setTemporaryValue(String temporaryValue)
    Temporarily overrides current raw value with an API call
    boolean
    Replaces all placeholders in current raw value, colorizes it, removes remove-strings and returns whether value changed or not
    Replaces all placeholders in current raw value, colorizes it, removes remove-strings and returns it.
  • Method Details

    • getOriginalRawValue

      String getOriginalRawValue()
      Returns original raw value ignoring API calls
      Returns:
      original raw value
    • setTemporaryValue

      void setTemporaryValue(String temporaryValue)
      Temporarily overrides current raw value with an API call
      Parameters:
      temporaryValue - temporary value to be assigned
    • getTemporaryValue

      String getTemporaryValue()
      Returns current temporary value
      Returns:
      temporary value or null if not set
    • getCurrentRawValue

      String getCurrentRawValue()
      Returns temporary value (via API) if present, raw value otherwise
      Returns:
      current raw value
    • get

      String get()
      Returns last known value
      Returns:
      last known value
    • update

      boolean update()
      Replaces all placeholders in current raw value, colorizes it, removes remove-strings and returns whether value changed or not
      Returns:
      if updating changed value or not
    • updateAndGet

      String updateAndGet()
      Replaces all placeholders in current raw value, colorizes it, removes remove-strings and returns it. Equal to calling update() and then get().
      Returns:
      updated value
    • getFormat

      String getFormat(TabPlayer viewer)
      Returns value for defined viewer by applying relational placeholders to last known value
      Parameters:
      viewer - the viewer
      Returns:
      format for the viewer