mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-26 04:25:37 +01:00
Added checking for gamemode restriction bypass before trying to change gamemode
removed unreachable statement.
This commit is contained in:
parent
c2ad331ca5
commit
4246149bf2
@ -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 {
|
||||
|
@ -162,6 +162,5 @@ public class PermissionTools {
|
||||
// or if it was because a world wasn't imported.
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user