Add crossworld check to enderchests

This commit is contained in:
Max Lee 2015-04-03 01:32:38 +02:00
parent 56f633d58b
commit 4013098201

View file

@ -122,6 +122,12 @@ public class OpenEnderPluginCommand implements CommandExecutor {
return;
}
// Crossworld check
if ((!OpenInv.hasPermission(player, Permissions.PERM_CROSSWORLD) && !OpenInv.hasPermission(player, Permissions.PERM_OVERRIDE)) && target.getWorld() != player.getWorld()) {
player.sendMessage(ChatColor.RED + target.getDisplayName() + " is not in your world!");
return;
}
// Record the target
openEnderHistory.put(player, target.getName());