From e6b7686f4d01a5db3ac140d5de08c3a066898807 Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Fri, 17 Apr 2020 23:22:30 +0200 Subject: [PATCH] Wrap all world fields in WeakReferences --- .../main/java/de/erethon/dungeonsxl/command/PortalCommand.java | 1 - core/src/main/java/de/erethon/dungeonsxl/player/DGroup.java | 1 - 2 files changed, 2 deletions(-) diff --git a/core/src/main/java/de/erethon/dungeonsxl/command/PortalCommand.java b/core/src/main/java/de/erethon/dungeonsxl/command/PortalCommand.java index 0d7e8b80..0eb5faf7 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/command/PortalCommand.java +++ b/core/src/main/java/de/erethon/dungeonsxl/command/PortalCommand.java @@ -71,7 +71,6 @@ public class PortalCommand extends DCommand { if (dPortal == null) { dPortal = new DPortal(plugin, plugin.getGlobalProtectionCache().generateId(DPortal.class, player.getWorld()), player.getWorld(), material, false); dGlobalPlayer.setCreatingPortal(dPortal); - dPortal.setWorld(player.getWorld()); dGlobalPlayer.setCachedItem(player.getInventory().getItemInHand()); player.getInventory().setItemInHand(VanillaItem.WOODEN_SWORD.toItemStack()); MessageUtil.sendMessage(player, DMessage.PLAYER_PORTAL_INTRODUCTION.getMessage()); diff --git a/core/src/main/java/de/erethon/dungeonsxl/player/DGroup.java b/core/src/main/java/de/erethon/dungeonsxl/player/DGroup.java index 42465594..d4999201 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/player/DGroup.java +++ b/core/src/main/java/de/erethon/dungeonsxl/player/DGroup.java @@ -635,7 +635,6 @@ public class DGroup implements PlayerGroup { game.setWorld(gameWorld); for (DGamePlayer player : getDGamePlayers()) { - player.setWorld(gameWorld.getWorld()); player.setLastCheckpoint(gameWorld.getStartLocation(this)); if (player.getWolf() != null) { player.getWolf().teleport(player.getLastCheckpoint());