diff --git a/core/src/main/java/mc/core/Location.java b/core/src/main/java/mc/core/Location.java index 474ab1d..438efd9 100644 --- a/core/src/main/java/mc/core/Location.java +++ b/core/src/main/java/mc/core/Location.java @@ -12,10 +12,6 @@ import lombok.Data; public class Location implements Cloneable { private double x, y, z; - public static Location copyOf(Location location) { - return location.clone(); - } - public Location (Location location) { this.x = location.getX(); this.y = location.getY(); @@ -49,7 +45,7 @@ public class Location implements Cloneable { } @Override - protected Location clone() { + public Location clone() { try { return (Location) super.clone(); } catch (CloneNotSupportedException e) { diff --git a/proto_1.12.2/src/main/java/mc/core/network/proto_1_12_2/TeleportManager.java b/proto_1.12.2/src/main/java/mc/core/network/proto_1_12_2/TeleportManager.java index 31424bd..90c735f 100644 --- a/proto_1.12.2/src/main/java/mc/core/network/proto_1_12_2/TeleportManager.java +++ b/proto_1.12.2/src/main/java/mc/core/network/proto_1_12_2/TeleportManager.java @@ -38,7 +38,7 @@ public class TeleportManager { teleportId = RAND.nextInt(9999); } while (teleportMap.containsKey(teleportId)); - teleportMap.put(teleportId, new TpData(player, Location.copyOf(location))); + teleportMap.put(teleportId, new TpData(player, location.clone())); return teleportId; }