Try to restore inventories on server join.

This should have absolutely no effect due to the implementation
of the restore method. If no file exists, nothing happens, but if
for some reason the inventory was never restored, it will be.
This commit is contained in:
Andreas Troelsen
2013-01-25 23:12:50 +01:00
parent 9d7fbf7247
commit 3f3518ab5b
@@ -17,6 +17,7 @@ import com.garbagemule.MobArena.framework.Arena;
import com.garbagemule.MobArena.framework.ArenaMaster;
import com.garbagemule.MobArena.leaderboards.Stats;
import com.garbagemule.MobArena.util.VersionChecker;
import com.garbagemule.MobArena.util.inventory.InventoryManager;
/**
* The point of this class is to simply redirect all events to each arena's
@@ -227,6 +228,7 @@ public class MAGlobalListener implements Listener
@EventHandler(priority = EventPriority.NORMAL)
public void playerJoin(PlayerJoinEvent event) {
InventoryManager.restoreFromFile(plugin, event.getPlayer());
if (!am.notifyOnUpdates() || !event.getPlayer().isOp()) return;
final Player p = event.getPlayer();