Class MessageHandling

java.lang.Object
adhdmc.simplepms.handling.MessageHandling

public class MessageHandling extends Object
  • Field Details

    • instance

      private static MessageHandling instance
    • spyingPlayers

      HashSet<org.bukkit.entity.Player> spyingPlayers
    • lastMessaged

      org.bukkit.NamespacedKey lastMessaged
    • consoleChatComponent

      net.kyori.adventure.text.Component consoleChatComponent
    • consoleSpyComponent

      net.kyori.adventure.text.Component consoleSpyComponent
  • Constructor Details

    • MessageHandling

      private MessageHandling()
  • Method Details

    • getInstance

      public static MessageHandling getInstance()
    • playerSenderAndReceiver

      public void playerSenderAndReceiver(org.bukkit.entity.Player initiator, org.bukkit.entity.Player recipient, String messageContent)
      Calls the message event and handles socialspy for a message between 2 players.
      Sends messageContent to Resolvers.
      Uses Message keys:
      • RECEIVING_FORMAT
      • SENDING_FORMAT
      • SPY_FORMAT
      Parameters:
      initiator - Player
      recipient - Player
      messageContent - String
    • consoleSenderPlayerReceiver

      public void consoleSenderPlayerReceiver(org.bukkit.command.CommandSender initiator, org.bukkit.entity.Player recipient, String messageContent)
      Calls the message event and handles socialspy for a message sent by the console, and received by a player
      Sends messageContent to Resolvers.
      Uses Message keys:
      • RECEIVING_FORMAT
      • SENDING_FORMAT
      • CONSOLE_FORMAT
      • SPY_FORMAT
      • CONSOLE_FORMAT_SPY
      Parameters:
      initiator - CommandSender
      recipient - Player
      messageContent - String
    • playerSenderConsoleReceiver

      public void playerSenderConsoleReceiver(org.bukkit.command.CommandSender initiator, String messageContent)
      Calls the message event and handles socialspy for a message sent by a player to the console.
      Sends messageContent to Resolvers.
      Uses Message keys:
      • ERROR_PLAYER_COMMAND
      • SENDING_FORMAT
      • CONSOLE_FORMAT
      • SPY_FORMAT
      • CONSOLE_FORMAT_SPY
      Parameters:
      initiator - CommandSender
      messageContent - String