25 lines
616 B
Java
25 lines
616 B
Java
package games.dmg.spigotbase;
|
|
|
|
import java.util.UUID;
|
|
|
|
public record PocketPortalLocation(
|
|
UUID worldId,
|
|
String worldName,
|
|
int x,
|
|
int y,
|
|
int z,
|
|
PocketPortalAxis axis
|
|
) {
|
|
public PocketPortalLocation {
|
|
if (worldId == null) {
|
|
throw new IllegalArgumentException("portal world ID is required");
|
|
}
|
|
if (worldName == null || worldName.isBlank()) {
|
|
throw new IllegalArgumentException("portal world name is required");
|
|
}
|
|
if (axis == null) {
|
|
throw new IllegalArgumentException("portal axis is required");
|
|
}
|
|
}
|
|
}
|