Skip to content

Commit

Permalink
[CORE] Merge if Statements when checking PerWorld
Browse files Browse the repository at this point in the history
Signed-off-by: Wolfieheart <[email protected]>
  • Loading branch information
Wolfieheart committed Oct 15, 2023
1 parent 7687039 commit f54fba8
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,10 @@ void onRightClickTool(PlayerInteractEvent e) {
if (plugin.requireSneaking && !player.isSneaking()) return;
if (!player.hasPermission("asedit.basic")) return;

if (plugin.enablePerWorld){
if (!plugin.allowedWorldList.contains(player.getWorld().getName())) { //Implementation for Per World ASE
if (plugin.enablePerWorld && (!plugin.allowedWorldList.contains(player.getWorld().getName()))) { //Implementation for Per World ASE
getPlayerEditor(player.getUniqueId()).sendMessage("notincorrectworld", "warn");
e.setCancelled(true);
return;
}
}
e.setCancelled(true);
getPlayerEditor(player.getUniqueId()).openMenu();
Expand Down

0 comments on commit f54fba8

Please sign in to comment.