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:
@@ -2,6 +2,8 @@ package net.knarcraft.stargate.event;
|
||||
|
||||
import net.knarcraft.stargate.portal.Portal;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* An abstract event describing any stargate event where a player is involved
|
||||
@@ -16,7 +18,7 @@ public abstract class StargatePlayerEvent extends StargateEvent {
|
||||
*
|
||||
* @param portal <p>The portal involved in this stargate event</p>
|
||||
*/
|
||||
StargatePlayerEvent(Portal portal, Player player) {
|
||||
StargatePlayerEvent(@NotNull Portal portal, @Nullable Player player) {
|
||||
super(portal);
|
||||
this.player = player;
|
||||
}
|
||||
@@ -26,6 +28,7 @@ public abstract class StargatePlayerEvent extends StargateEvent {
|
||||
*
|
||||
* @return <p>The player creating the star gate</p>
|
||||
*/
|
||||
@Nullable
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
Reference in New Issue
Block a user