mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-08 03:40:04 +01:00
Wrap all world fields in WeakReferences
This commit is contained in:
parent
964337815b
commit
e6b7686f4d
@ -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());
|
||||||
|
@ -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());
|
||||||
|
Loading…
Reference in New Issue
Block a user