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:
2021-02-20 13:57:04 +01:00
parent 2ae4fc9645
commit 1721750aa1
29 changed files with 1499 additions and 1206 deletions

View File

@ -11,13 +11,12 @@ import org.jetbrains.annotations.NotNull;
@SuppressWarnings("unused")
public class StargateCreateEvent extends StargatePlayerEvent {
private static final HandlerList handlers = new HandlerList();
private final String[] lines;
private boolean deny;
private String denyReason;
private final String[] lines;
private int cost;
private static final HandlerList handlers = new HandlerList();
/**
* Instantiates a new stargate creation event
*
@ -36,6 +35,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;
}
/**
* Gets a given line from the sign creating the star gate
*
@ -101,15 +109,6 @@ 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() {