Improves comments for Stargate events, and adds a new event for teleporting entities
Adds information about what events can be used for Tries to clarify event comments where possible Renames The StargatePortalEvent to StargatePlayerPortalEvent Adds StargateEntityPortalEvent Makes the StargateEntityPortalEvent trigger whenever a vehicle is teleported Removes the unused event name for all events
This commit is contained in:
@ -6,6 +6,9 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* This event should be called whenever a stargate is closed
|
||||
*
|
||||
* <p>This event can be used to overwrite whether the stargate should be forced to close, even if it's set as
|
||||
* always-on.</p>
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class StargateCloseEvent extends StargateEvent {
|
||||
@ -20,20 +23,11 @@ public class StargateCloseEvent extends StargateEvent {
|
||||
* @param force <p>Whether to force the gate to close, even if set as always-on</p>
|
||||
*/
|
||||
public StargateCloseEvent(Portal portal, boolean force) {
|
||||
super("StargateCloseEvent", portal);
|
||||
super(portal);
|
||||
|
||||
this.force = force;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a handler-list containing all event handlers
|
||||
*
|
||||
* @return <p>A handler-list with all event handlers</p>
|
||||
*/
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets whether to force the stargate to close
|
||||
*
|
||||
@ -52,6 +46,15 @@ public class StargateCloseEvent extends StargateEvent {
|
||||
this.force = force;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a handler-list containing all event handlers
|
||||
*
|
||||
* @return <p>A handler-list with all event handlers</p>
|
||||
*/
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
|
Reference in New Issue
Block a user