mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Ensure Location is still sealed, and add api description annotation to public methods in UncheckedWorldLocation
This commit is contained in:
parent
8608604306
commit
058c65e34c
@ -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<Location> {
|
||||
public sealed class Location extends BlockLoc implements Comparable<Location> permits UncheckedWorldLocation {
|
||||
|
||||
private final float yaw;
|
||||
private final float pitch;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user