Package me.neznamy.tab.api
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 TypeMethodDescriptionget()Returns last known valueReturns temporary value (via API) if present, raw value otherwiseReturns value for defined viewer by applying relational placeholders to last known valueReturns original raw value ignoring API callsReturns current temporary valuevoidsetTemporaryValue(String temporaryValue) Temporarily overrides current raw value with an API callbooleanupdate()Replaces all placeholders in current raw value, colorizes it, removes remove-strings and returns whether value changed or notReplaces 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
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
Returns value for defined viewer by applying relational placeholders to last known value- Parameters:
viewer- the viewer- Returns:
- format for the viewer
-