Wrap all world fields in WeakReferences

This commit is contained in:
Daniel Saukel 2020-04-17 23:22:30 +02:00
parent 964337815b
commit e6b7686f4d
2 changed files with 0 additions and 2 deletions

View File

@ -71,7 +71,6 @@ public class PortalCommand extends DCommand {
if (dPortal == null) { if (dPortal == null) {
dPortal = new DPortal(plugin, plugin.getGlobalProtectionCache().generateId(DPortal.class, player.getWorld()), player.getWorld(), material, false); dPortal = new DPortal(plugin, plugin.getGlobalProtectionCache().generateId(DPortal.class, player.getWorld()), player.getWorld(), material, false);
dGlobalPlayer.setCreatingPortal(dPortal); dGlobalPlayer.setCreatingPortal(dPortal);
dPortal.setWorld(player.getWorld());
dGlobalPlayer.setCachedItem(player.getInventory().getItemInHand()); dGlobalPlayer.setCachedItem(player.getInventory().getItemInHand());
player.getInventory().setItemInHand(VanillaItem.WOODEN_SWORD.toItemStack()); player.getInventory().setItemInHand(VanillaItem.WOODEN_SWORD.toItemStack());
MessageUtil.sendMessage(player, DMessage.PLAYER_PORTAL_INTRODUCTION.getMessage()); MessageUtil.sendMessage(player, DMessage.PLAYER_PORTAL_INTRODUCTION.getMessage());

View File

@ -635,7 +635,6 @@ public class DGroup implements PlayerGroup {
game.setWorld(gameWorld); game.setWorld(gameWorld);
for (DGamePlayer player : getDGamePlayers()) { for (DGamePlayer player : getDGamePlayers()) {
player.setWorld(gameWorld.getWorld());
player.setLastCheckpoint(gameWorld.getStartLocation(this)); player.setLastCheckpoint(gameWorld.getStartLocation(this));
if (player.getWolf() != null) { if (player.getWolf() != null) {
player.getWolf().teleport(player.getLastCheckpoint()); player.getWolf().teleport(player.getLastCheckpoint());