mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
More refactor work, encapsulate classes
This commit is contained in:
1 parent
3e1ec09487
commit
1cebdac9b8
51 files changed
+756
-621
No files matched your search
@@ -19,15 +19,15 @@ public final class BukkitAdapter {
|
||||
* @return the adapted {@link Location}
|
||||
*/
|
||||
public static Optional<org.bukkit.Location> adaptLocation(@NotNull Location location) {
|
||||
org.bukkit.World world = Bukkit.getWorld(location.world.name);
|
||||
org.bukkit.World world = Bukkit.getWorld(location.getWorld().getName());
|
||||
if (world == null) {
|
||||
world = Bukkit.getWorld(location.world.uuid);
|
||||
world = Bukkit.getWorld(location.getWorld().getUuid());
|
||||
}
|
||||
if (world == null) {
|
||||
return Optional.empty();
|
||||
}
|
||||
return Optional.of(new org.bukkit.Location(world, location.x, location.y, location.z,
|
||||
location.yaw, location.pitch));
|
||||
return Optional.of(new org.bukkit.Location(world, location.getX(), location.getY(), location.getZ(),
|
||||
location.getYaw(), location.getPitch()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user