java.lang.Object
me.github.simonplays15.betterbansystem.spigot.event.events.PlayerChatEvents
All Implemented Interfaces:
org.bukkit.event.Listener

public class PlayerChatEvents extends Object implements org.bukkit.event.Listener
This class handles player chat events and performs various actions based on the event.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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.

    Methods inherited from class java.lang.Object

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