Adds nullability annotations among other things

Adds nullability annotations for all methods
Fixes some nullability problems and inconsistencies
Gets rid of RelativeBlockVector's inner class
Changes RelativeBlockVector to a record
Simplifies FromTheEndTeleportation's storage, and makes it into a minimal record
Removes the putStringInList method
Gets rid of some primitive list usage
Fixes some incorrect method accessibility
Removes some redundancy in PortalOption
This commit is contained in:
2024-02-20 12:43:01 +01:00
parent 894a692e7b
commit b4a6ce1a77
78 changed files with 1025 additions and 639 deletions

View File

@@ -27,7 +27,8 @@ public class StargateDestroyEvent extends StargatePlayerEvent {
* @param denyMsg <p>The message to display if the event is denied</p>
* @param cost <p>The cost of destroying the portal</p>
*/
public StargateDestroyEvent(Portal portal, Player player, boolean deny, String denyMsg, int cost) {
public StargateDestroyEvent(@NotNull Portal portal, @NotNull Player player, boolean deny, @NotNull String denyMsg,
int cost) {
super(portal, player);
this.deny = deny;
this.denyReason = denyMsg;
@@ -57,6 +58,7 @@ public class StargateDestroyEvent extends StargatePlayerEvent {
*
* @return <p>The reason the event was denied</p>
*/
@NotNull
public String getDenyReason() {
return denyReason;
}
@@ -66,7 +68,7 @@ public class StargateDestroyEvent extends StargatePlayerEvent {
*
* @param denyReason <p>The reason the event was denied</p>
*/
public void setDenyReason(String denyReason) {
public void setDenyReason(@NotNull String denyReason) {
this.denyReason = denyReason;
}
@@ -93,6 +95,7 @@ public class StargateDestroyEvent extends StargatePlayerEvent {
*
* @return <p>A handler-list with all event handlers</p>
*/
@NotNull
public static HandlerList getHandlerList() {
return handlers;
}