Class SetHomeEvent

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

public class SetHomeEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called when a set home request is initiated
This is called before the home is applied to the owner
Cancel this event to prevent the set home action from occuring
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
    SetHomeEvent(Home home, com.stardevllc.starmclib.actors.Actor actor)
    Creates a new set home event
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<com.stardevllc.starmclib.actors.Actor>
    The actor that requested the action
    static org.bukkit.event.HandlerList
    Bukkit event things
    org.bukkit.event.HandlerList
     
    The home for the request
    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

    • SetHomeEvent

      public SetHomeEvent(Home home, com.stardevllc.starmclib.actors.Actor actor)
      Creates a new set home event
      Parameters:
      home - The home that is to be applied
      actor - The actor that performed the request (Can be null)
  • Method Details

    • getHome

      public Home getHome()
      The home for the request
      Returns:
      The home
    • getActor

      public Optional<com.stardevllc.starmclib.actors.Actor> getActor()
      The actor that requested the action
      Returns:
      The actor as an optional
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Bukkit event things
      Returns:
      The handler list
    • 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