mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +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)
|
* An unmodifiable 6-tuple (world,x,y,z,yaw,pitch)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
@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 yaw;
|
||||||
private final float pitch;
|
private final float pitch;
|
||||||
|
@ -36,7 +36,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
|||||||
* @since TODO
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
@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;
|
private final String worldName;
|
||||||
|
|
||||||
@ -61,6 +61,7 @@ public class UncheckedWorldLocation extends Location {
|
|||||||
*
|
*
|
||||||
* @since TODO
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
|
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
||||||
public static @NonNull UncheckedWorldLocation at(
|
public static @NonNull UncheckedWorldLocation at(
|
||||||
final @NonNull String world, final int x, final int y, final int z
|
final @NonNull String world, final int x, final int y, final int z
|
||||||
) {
|
) {
|
||||||
@ -68,6 +69,7 @@ public class UncheckedWorldLocation extends Location {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
||||||
public @NonNull String getWorldName() {
|
public @NonNull String getWorldName() {
|
||||||
return this.worldName;
|
return this.worldName;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user