Class RenameHomeEvent

java.lang.Object
org.bukkit.event.Event
com.stardevllc.starhomes.events.RenameHomeEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class RenameHomeEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called when a rename home request is initiated
This event is called before the actual rename occurs
Cancel this event to stop the rename
See Also:
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    RenameHomeEvent(Home home, String newName, com.stardevllc.starmclib.actors.Actor actor)
    Creates a new rename home event
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<com.stardevllc.starmclib.actors.Actor>
    The actor of the request (Can be null)
    static org.bukkit.event.HandlerList
    Bukkit Event stuff
    org.bukkit.event.HandlerList
     
    The home of the rename request
    The new name for the home
    boolean
     
    void
    setCancelled(boolean b)
     

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RenameHomeEvent

      public RenameHomeEvent(Home home, String newName, com.stardevllc.starmclib.actors.Actor actor)
      Creates a new rename home event
      Parameters:
      home - The home that the request is targetting
      newName - The new name for the home
      actor - The actor that performed the request (Can be null)
  • Method Details

    • getHome

      public Home getHome()
      The home of the rename request
      Returns:
      The home to be renamed
    • getNewName

      public String getNewName()
      The new name for the home
      Returns:
      The new name
    • getActor

      public Optional<com.stardevllc.starmclib.actors.Actor> getActor()
      The actor of the request (Can be null)
      Returns:
      The actor as an optional
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Bukkit Event stuff
      Returns:
      HandlerList
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean b)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable