Adds comments and simplifies some of the code
Adds a PortalOption enum to simplify portal options Adds a BungeeHelper class to collect the bungee-related code
This commit is contained in:
@ -10,15 +10,15 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public class StargateOpenEvent extends StargatePlayerEvent {
|
||||
|
||||
private boolean force;
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean force;
|
||||
|
||||
/**
|
||||
* Instantiates a new stargate open event
|
||||
*
|
||||
* @param player <p>The player opening the stargate</p>
|
||||
* @param portal <p>The portal opened</p>
|
||||
* @param force <p>Whether to force the portal open</p>
|
||||
* @param force <p>Whether to force the portal open</p>
|
||||
*/
|
||||
public StargateOpenEvent(Player player, Portal portal, boolean force) {
|
||||
super("StargateOpenEvent", portal, player);
|
||||
@ -26,8 +26,18 @@ public class StargateOpenEvent extends StargatePlayerEvent {
|
||||
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 the portal should be forced open
|
||||
*
|
||||
* @return <p>Whether the portal should be forced open</p>
|
||||
*/
|
||||
public boolean getForce() {
|
||||
@ -36,20 +46,13 @@ public class StargateOpenEvent extends StargatePlayerEvent {
|
||||
|
||||
/**
|
||||
* Sets whether the portal should be forced open
|
||||
*
|
||||
* @param force <p>Whether the portal should be forced open</p>
|
||||
*/
|
||||
public void setForce(boolean force) {
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public HandlerList getHandlers() {
|
||||
|
Reference in New Issue
Block a user