From dfed686982d6b4dfea5269a129aa40ab887bf6aa Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Thu, 8 Jul 2021 17:42:05 +0200 Subject: [PATCH] Fix Java deprecations --- .../java/de/erethon/dungeonsxl/world/DEditWorld.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/de/erethon/dungeonsxl/world/DEditWorld.java b/core/src/main/java/de/erethon/dungeonsxl/world/DEditWorld.java index ad46e4fd..f3b2ad80 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/world/DEditWorld.java +++ b/core/src/main/java/de/erethon/dungeonsxl/world/DEditWorld.java @@ -95,14 +95,14 @@ public class DEditWorld extends DInstanceWorld implements EditWorld { } plugin.setLoadingWorld(true); - Map players = new HashMap<>(); + Map players = new HashMap<>(); getWorld().getPlayers().forEach(p -> players.put(p, - new Double[]{ + new double[]{ p.getLocation().getX(), p.getLocation().getY(), p.getLocation().getZ(), - new Double(p.getLocation().getYaw()), - new Double(p.getLocation().getPitch()) + p.getLocation().getYaw(), + p.getLocation().getPitch() } )); kickAllPlayers(); @@ -124,8 +124,8 @@ public class DEditWorld extends DInstanceWorld implements EditWorld { players.keySet().forEach(p -> { if (p.isOnline()) { new DEditPlayer(plugin, p, newEditWorld); - Double[] coords = players.get(p); - p.teleport(new Location(newEditWorld.getWorld(), coords[0], coords[1], coords[2], coords[3].floatValue(), coords[4].floatValue())); + double[] coords = players.get(p); + p.teleport(new Location(newEditWorld.getWorld(), coords[0], coords[1], coords[2], (float) coords[3], (float) coords[4])); } }); }