Add the permission to the debugging when a sender doesn't have
permission.
This commit is contained in:
parent
830cf5cebb
commit
a23062d890
@ -98,8 +98,8 @@ public class JailHandler {
|
|||||||
// First, let's check if the sender has permission for the command.
|
// First, let's check if the sender has permission for the command.
|
||||||
if(!i.permission().isEmpty()) {
|
if(!i.permission().isEmpty()) {
|
||||||
if(!sender.hasPermission(i.permission())) {
|
if(!sender.hasPermission(i.permission())) {
|
||||||
jailmanager.getPlugin().debug("Sender has no permission.");
|
jailmanager.getPlugin().debug("Sender has no permission: " + i.permission());
|
||||||
sender.sendMessage(Lang.NOPERMISSION.get());
|
sender.sendMessage(Lang.NOPERMISSION.get() + (jailmanager.getPlugin().inDebug() ? " (" + i.permission() + ")" : ""));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user