Attempt to fix multiworld inventory issues.

This commit is contained in:
garbagemule
2013-07-30 23:37:03 +02:00
parent 13948e7554
commit f43293a376
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
name: MobArena name: MobArena
author: garbagemule author: garbagemule
main: com.garbagemule.MobArena.MobArena main: com.garbagemule.MobArena.MobArena
version: 0.95.5.4 version: 0.95.5.5
softdepend: [Spout,Towny,Heroes,MagicSpells,Vault] softdepend: [Spout,Towny,Heroes,MagicSpells,Vault]
commands: commands:
ma: ma:
+2 -2
View File
@@ -569,6 +569,7 @@ public class ArenaImpl implements Arena
} }
} }
movePlayerToLobby(p);
takeFee(p); takeFee(p);
storePlayerData(p, loc); storePlayerData(p, loc);
removePotionEffects(p); removePotionEffects(p);
@@ -580,7 +581,6 @@ public class ArenaImpl implements Arena
p.setExp(0.0f); p.setExp(0.0f);
} }
p.setGameMode(GameMode.SURVIVAL); p.setGameMode(GameMode.SURVIVAL);
movePlayerToLobby(p);
arenaPlayerMap.put(p, new ArenaPlayer(p, this, plugin)); arenaPlayerMap.put(p, new ArenaPlayer(p, this, plugin));
@@ -826,7 +826,7 @@ public class ArenaImpl implements Arena
// If there's no player stored, create a new one! // If there's no player stored, create a new one!
if (mp == null) { if (mp == null) {
mp = new PlayerData(p); mp = new PlayerData(p, loc);
playerData.put(p, mp); playerData.put(p, mp);
} }
+2 -2
View File
@@ -18,11 +18,11 @@ public class PlayerData
private Location entry = null; private Location entry = null;
private Collection<PotionEffect> potions; private Collection<PotionEffect> potions;
public PlayerData(Player player) { public PlayerData(Player player, Location loc) {
this.player = player; this.player = player;
this.mode = player.getGameMode(); this.mode = player.getGameMode();
this.entry = player.getLocation();
this.potions = player.getActivePotionEffects(); this.potions = player.getActivePotionEffects();
this.entry = loc;
update(); update();
} }