Package adhdmc.simplepms.handling
Class MessageHandling
java.lang.Object
adhdmc.simplepms.handling.MessageHandling
-
Field Summary
Modifier and TypeFieldDescription(package private) net.kyori.adventure.text.Component
(package private) net.kyori.adventure.text.Component
private static MessageHandling
(package private) org.bukkit.NamespacedKey
(package private) HashSet<org.bukkit.entity.Player>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.static MessageHandling
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.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.
-
Field Details
-
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
-
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
- Playerrecipient
- PlayermessageContent
- 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
- CommandSenderrecipient
- PlayermessageContent
- 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
- CommandSendermessageContent
- String
-