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:
@ -7,6 +7,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* This event should be called whenever a stargate is created
|
||||
*
|
||||
* <p>This event can be used to deny or change the cost of a stargate creation.</p>
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class StargateCreateEvent extends StargatePlayerEvent {
|
||||
@ -28,22 +30,13 @@ public class StargateCreateEvent extends StargatePlayerEvent {
|
||||
* @param cost <p>The cost of creating the new star gate</p>
|
||||
*/
|
||||
public StargateCreateEvent(Player player, Portal portal, String[] lines, boolean deny, String denyReason, int cost) {
|
||||
super("StargateCreateEvent", portal, player);
|
||||
super(portal, player);
|
||||
this.lines = lines;
|
||||
this.deny = deny;
|
||||
this.denyReason = denyReason;
|
||||
this.cost = cost;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 a given line from the sign creating the star gate
|
||||
*
|
||||
@ -109,6 +102,15 @@ public class StargateCreateEvent extends StargatePlayerEvent {
|
||||
this.cost = cost;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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