diff --git a/Core/src/main/java/com/plotsquared/core/location/Location.java b/Core/src/main/java/com/plotsquared/core/location/Location.java index 24f3e43d5..91200eb39 100644 --- a/Core/src/main/java/com/plotsquared/core/location/Location.java +++ b/Core/src/main/java/com/plotsquared/core/location/Location.java @@ -41,7 +41,7 @@ import org.khelekore.prtree.SimpleMBR; * An unmodifiable 6-tuple (world,x,y,z,yaw,pitch) */ @SuppressWarnings("unused") -public class Location extends BlockLoc implements Comparable { +public sealed class Location extends BlockLoc implements Comparable permits UncheckedWorldLocation { private final float yaw; private final float pitch; diff --git a/Core/src/main/java/com/plotsquared/core/location/UncheckedWorldLocation.java b/Core/src/main/java/com/plotsquared/core/location/UncheckedWorldLocation.java index aab412cb6..1e9b1a5bb 100644 --- a/Core/src/main/java/com/plotsquared/core/location/UncheckedWorldLocation.java +++ b/Core/src/main/java/com/plotsquared/core/location/UncheckedWorldLocation.java @@ -36,7 +36,7 @@ import org.checkerframework.checker.nullness.qual.NonNull; * @since TODO */ @AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.") -public class UncheckedWorldLocation extends Location { +public final class UncheckedWorldLocation extends Location { private final String worldName; @@ -61,6 +61,7 @@ public class UncheckedWorldLocation extends Location { * * @since TODO */ + @AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.") public static @NonNull UncheckedWorldLocation at( final @NonNull String world, final int x, final int y, final int z ) { @@ -68,6 +69,7 @@ public class UncheckedWorldLocation extends Location { } @Override + @AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.") public @NonNull String getWorldName() { return this.worldName; }