Added checking for gamemode restriction bypass before trying to change gamemode

removed unreachable statement.
This commit is contained in:
dumptruckman 2011-12-19 19:26:32 -05:00 committed by Tim Ekl
parent c2ad331ca5
commit 4246149bf2
2 changed files with 3 additions and 2 deletions

View File

@ -232,7 +232,9 @@ public class MVPlayerListener extends PlayerListener {
public void handleGameMode(Player player, MultiverseWorld world) {
// We perform this task one tick later to MAKE SURE that the player actually reaches the
// destination world, otherwise we'd be changing the player mode if they havent moved anywhere.
this.plugin.getServer().getScheduler().scheduleSyncDelayedTask(this.plugin, new HandleGameMode(player, world), 1L);
if (!this.pt.playerCanIgnoreGameModeRestriction(world, player)) {
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(this.plugin, new HandleGameMode(player, world), 1L);
}
}
private class SpawnNewbie implements Runnable {

View File

@ -162,6 +162,5 @@ public class PermissionTools {
// or if it was because a world wasn't imported.
return true;
}
return true;
}
}