mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2024-06-27 16:30:51 +00:00
Made enderchests equally protected as inventories
This commit is contained in:
parent
4013098201
commit
dce86d9c69
|
@ -122,6 +122,12 @@ public class OpenEnderPluginCommand implements CommandExecutor {
|
|||
return;
|
||||
}
|
||||
|
||||
// Permissions checks
|
||||
if (!OpenInv.hasPermission(player, Permissions.PERM_OVERRIDE) && OpenInv.hasPermission(target, Permissions.PERM_EXEMPT)) {
|
||||
player.sendMessage(ChatColor.RED + target.getDisplayName() + "'s enderchest is protected!");
|
||||
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!");
|
||||
|
|
Loading…
Reference in a new issue