Fix Fly and GameMode

This commit is contained in:
Xephi59
2015-07-09 18:04:43 +02:00
parent 1b9f4e7141
commit 7a4550246f
10 changed files with 59 additions and 63 deletions
+4 -1
View File
@@ -39,7 +39,7 @@ public class LimboCache {
boolean flying = false;
if (playerData.doesCacheExist(player)) {
StoreInventoryEvent event = new StoreInventoryEvent(player, playerData);
final StoreInventoryEvent event = new StoreInventoryEvent(player, playerData);
Bukkit.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled() && event.getInventory() != null && event.getArmor() != null) {
inv = event.getInventory();
@@ -90,6 +90,9 @@ public class LimboCache {
player.sendMessage("Your inventory has been cleaned!");
}
}
if (gameMode == GameMode.CREATIVE) {
flying = false;
}
gameMode = GameMode.SURVIVAL;
}
if (player.isDead()) {