Class ChatEvent

java.lang.Object
org.bukkit.event.Event
nl.mtvehicles.core.infrastructure.models.MTVEvent
nl.mtvehicles.core.events.ChatEvent
All Implemented Interfaces:
IsCancellable, org.bukkit.event.Cancellable

public class ChatEvent extends MTVEvent implements IsCancellable, org.bukkit.event.Cancellable
On player chat
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Field Summary

    Fields inherited from class nl.mtvehicles.core.infrastructure.models.MTVEvent

    cancelled
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the message that player has written
    void
    setCancelled​(boolean cancelled)
    Sets the cancellation state of this event.
    void
    setMessage​(String message)
    Set the message that player has written to something else

    Methods inherited from class nl.mtvehicles.core.infrastructure.models.MTVEvent

    call, getHandlerList, getHandlers, getPlayer, isCancelled, setPlayer

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.bukkit.event.Cancellable

    isCancelled
  • Constructor Details

    • ChatEvent

      public ChatEvent()
  • Method Details

    • setCancelled

      public void setCancelled(boolean cancelled)
      Description copied from interface: IsCancellable
      Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Specified by:
      setCancelled in interface IsCancellable
      Parameters:
      cancelled - true if you wish to cancel this event
    • getMessage

      public String getMessage()
      Get the message that player has written
      Returns:
      Message
    • setMessage

      public void setMessage(String message)
      Set the message that player has written to something else
      Parameters:
      message - New message