Class PrivateChatSession

java.lang.Object
me.tayebyassine.homestead.sessions.PrivateChatSession

public final class PrivateChatSession extends Object
Tracks which players are in private-region-chat mode.

When a player has an active session, their chat messages are routed to the region's private chat channel instead of the global chat.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final HashSet<UUID>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    hasSession(org.bukkit.entity.Player player)
    Check whether the given player is in private chat mode.
    static void
    newSession(org.bukkit.entity.Player player)
    Enable private chat mode for the given player.
    static void
    removeSession(org.bukkit.entity.Player player)
    Disable private chat mode for the given player.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SESSIONS

      public static final HashSet<UUID> SESSIONS
  • Method Details

    • newSession

      public static void newSession(org.bukkit.entity.Player player)
      Enable private chat mode for the given player.
      Parameters:
      player - the player to enable private chat for
    • hasSession

      public static boolean hasSession(org.bukkit.entity.Player player)
      Check whether the given player is in private chat mode.
      Parameters:
      player - the player to check
      Returns:
      true if the player has an active private chat session
    • removeSession

      public static void removeSession(org.bukkit.entity.Player player)
      Disable private chat mode for the given player.
      Parameters:
      player - the player to disable private chat for