cancel command event even with no perms

This commit is contained in:
rockyhawk64 2025-10-13 19:23:48 +11:00
parent 732995f2f2
commit f5993c525a

View File

@ -68,8 +68,11 @@ public class PanelOpenCommand implements Listener {
return;
}
// No panel was found that could be opened
if(hadMatch) ctx.text.sendError(e.getPlayer(), Message.COMMAND_NO_PERMISSION);
// Had panel match but no panel had permission, cancel and send no perm message
if(hadMatch){
ctx.text.sendError(e.getPlayer(), Message.COMMAND_NO_PERMISSION);
e.setCancelled(true);
}
}
public void populateCommands() {