package net.knarcraft.stargate.event; import net.knarcraft.stargate.Portal; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.jetbrains.annotations.NotNull; import java.util.List; /** * This event should be called whenever a player activates a stargate *
Activation of a stargate happens when a player right-clicks the sign of a stargate.
*/ @SuppressWarnings("unused") public class StargateActivateEvent extends StargatePlayerEvent { private static final HandlerList handlers = new HandlerList(); private ListThe activated portal
* @param playerThe player activating the portal
* @param destinationsThe destinations available to the player using the portal
* @param destinationThe chosen destination to activate
*/ public StargateActivateEvent(Portal portal, Player player, ListA handler-list with all event handlers
*/ public static HandlerList getHandlerList() { return handlers; } /** * Gets the destinations available for the portal * * @returnThe destinations available for the portal
*/ public ListThe new list of available destinations
*/ public void setDestinations(ListThe chosen destination to activate
*/ public String getDestination() { return destination; } /** * Sets (changes) the chosen destination to activate * * @param destinationThe new destination to activate
*/ public void setDestination(String destination) { this.destination = destination; } @Override @NotNull public HandlerList getHandlers() { return handlers; } }