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 second
    int getMaxHookLength()
    Gets the max length of the hook
    java.util.UUID getPlayerUUID()
    Gets the owning player of this hook
    int getTimeRemaining()
    Gets how much time is remaining on the hook
    boolean timedOut()
    Checks if this hook has timed out
    void triggerCallback​(java.lang.String textEntered)
    Executes the callback function

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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