Class PlayerChatEvents
java.lang.Object
me.github.simonplays15.betterbansystem.spigot.event.events.PlayerChatEvents
- All Implemented Interfaces:
org.bukkit.event.Listener
This class handles player chat events and performs various actions based on the
event.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onChat
(@NotNull org.bukkit.event.player.AsyncPlayerChatEvent event) Handles the onChat event.void
onCommandSend
(@NotNull org.bukkit.event.player.PlayerCommandPreprocessEvent event) This method handles the PlayerCommandPreprocessEvent and checks if the player is muted.
-
Constructor Details
-
PlayerChatEvents
public PlayerChatEvents()
-
-
Method Details
-
onChat
public void onChat(@NotNull @NotNull org.bukkit.event.player.AsyncPlayerChatEvent event) Handles the onChat event.- Parameters:
event
- The AsyncPlayerChatEvent that is triggered when a player chats.
-
onCommandSend
public void onCommandSend(@NotNull @NotNull org.bukkit.event.player.PlayerCommandPreprocessEvent event) This method handles the PlayerCommandPreprocessEvent and checks if the player is muted. If the player is muted and the command is in the blocked command list, the event is cancelled and a message is sent to the player.- Parameters:
event
- The PlayerCommandPreprocessEvent that triggered the method.
-