Updated and improved the Essentials Migrator's compatibility

Signed-off-by: BuildTools <[email protected]>
This commit is contained in:
BuildTools committed 2021-07-14 23:38:06 +03:00
1 parent e9066e13e3
commit 7f7081a434
3 files changed
+123 -72

No files matched your search

@@ -24,7 +24,7 @@ public class Home extends TeleportationPoint {
/**
* An object representing a Player's home in-game
* @param location The Bukkit location of the home
* @param location The Bukkit {@link Location} of the home
* @param server The Bungee server ID of the home
* @param homeOwner The Player who owns the home
* @param name The name of the home
@@ -41,14 +41,15 @@ public class Home extends TeleportationPoint {
/**
* An object representing a Player's home in-game
* @param teleportationPoint The position of the home
* @deprecated Use other method that accepts UUID instead of UUID-string
* @param teleportationPoint The {@link TeleportationPoint} position of the home
* @param ownerUsername The username of the owner
* @param ownerUUID The UUID of the owner
* @param ownerUUID The UUID string of the owner
* @param name The name of the home
* @param description The description of the home
* @param isPublic Whether or not the home is public
*/
public Home(TeleportationPoint teleportationPoint, String ownerUsername, String ownerUUID, String name, String description, boolean isPublic) {
public Home(TeleportationPoint teleportationPoint, String ownerUsername, String ownerUUID, String name, String description, boolean isPublic) throws IllegalArgumentException {
super(teleportationPoint.worldName, teleportationPoint.x, teleportationPoint.y, teleportationPoint.z, teleportationPoint.yaw, teleportationPoint.pitch, teleportationPoint.server);
this.ownerUsername = ownerUsername;
this.ownerUUID = UUID.fromString(ownerUUID);
@@ -57,6 +58,24 @@ public class Home extends TeleportationPoint {
this.isPublic = isPublic;
}
/**
* An object representing a Player's home in-game
* @param teleportationPoint The {@link TeleportationPoint} position of the home
* @param ownerUsername The username of the owner
* @param ownerUUID The {@link UUID} of the owner
* @param name The name of the home
* @param description The description of the home
* @param isPublic Whether or not the home is public
*/
public Home(TeleportationPoint teleportationPoint, String ownerUsername, UUID ownerUUID, String name, String description, boolean isPublic) {
super(teleportationPoint.worldName, teleportationPoint.x, teleportationPoint.y, teleportationPoint.z, teleportationPoint.yaw, teleportationPoint.pitch, teleportationPoint.server);
this.ownerUsername = ownerUsername;
this.ownerUUID = ownerUUID;
this.name = name;
this.description = description;
this.isPublic = isPublic;
}
/**
* Returns whether or not the Home is public
* @return if the Home is public