Class PlayerChatHookData
java.lang.Object
dev.esophose.playerparticles.gui.hook.PlayerChatHookData
public class PlayerChatHookData
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description PlayerChatHookData(java.util.UUID playerUUID, int hookLength, java.util.function.Consumer<java.lang.String> hookCallback)
-
Method Summary
Modifier and Type Method Description void
decrementHookLength()
Decrements the time remaining on this hook by 1 secondint
getMaxHookLength()
Gets the max length of the hookjava.util.UUID
getPlayerUUID()
Gets the owning player of this hookint
getTimeRemaining()
Gets how much time is remaining on the hookboolean
timedOut()
Checks if this hook has timed outvoid
triggerCallback(java.lang.String textEntered)
Executes the callback function
-
Constructor Details
-
PlayerChatHookData
public PlayerChatHookData(java.util.UUID playerUUID, int hookLength, java.util.function.Consumer<java.lang.String> hookCallback)
-
-
Method Details
-
getPlayerUUID
public java.util.UUID getPlayerUUID()Gets the owning player of this hook- Returns:
- The player's UUID
-
decrementHookLength
public void decrementHookLength()Decrements the time remaining on this hook by 1 second -
timedOut
public boolean timedOut()Checks if this hook has timed out- Returns:
- If this hook has timed out
-
getMaxHookLength
public int getMaxHookLength()Gets the max length of the hook- Returns:
- The max length of the hook
-
getTimeRemaining
public int getTimeRemaining()Gets how much time is remaining on the hook- Returns:
- The amount of time remaining on the hook
-
triggerCallback
public void triggerCallback(java.lang.String textEntered)Executes the callback function- Parameters:
textEntered
- The text that was entered by the player
-