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 voiddecrementHookLength()Decrements the time remaining on this hook by 1 secondintgetMaxHookLength()Gets the max length of the hookjava.util.UUIDgetPlayerUUID()Gets the owning player of this hookintgetTimeRemaining()Gets how much time is remaining on the hookbooleantimedOut()Checks if this hook has timed outvoidtriggerCallback(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
-