mirror of
https://github.com/TotalFreedomMC/OpenInv.git
synced 2024-12-23 00:15:08 +00:00
Add crossworld check to enderchests
This commit is contained in:
parent
56f633d58b
commit
4013098201
1 changed files with 6 additions and 0 deletions
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in a new issue