mirror of
https://github.com/songoda/UltimateKits.git
synced 2025-02-18 12:21:21 +01:00
Added perm check for /kit command.
This commit is contained in:
parent
c6a5fc3abb
commit
2fed466f51
@ -44,6 +44,12 @@ public class CommandKit extends AbstractCommand {
|
|||||||
if (!(sender instanceof Player))
|
if (!(sender instanceof Player))
|
||||||
return ReturnType.NEEDS_PLAYER;
|
return ReturnType.NEEDS_PLAYER;
|
||||||
|
|
||||||
|
|
||||||
|
if (!kit.hasPermission((Player)sender)) {
|
||||||
|
instance.getLocale().getMessage("command.general.noperms").sendPrefixedMessage(sender);
|
||||||
|
return ReturnType.FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
kit.processGenericUse((Player) sender, false);
|
kit.processGenericUse((Player) sender, false);
|
||||||
return ReturnType.SUCCESS;
|
return ReturnType.SUCCESS;
|
||||||
} else if (args.length == 2) {
|
} else if (args.length == 2) {
|
||||||
|
Loading…
Reference in New Issue
Block a user