From 2fed466f51ecc0e660dd1bf24cde4844c4df77ff Mon Sep 17 00:00:00 2001 From: Brianna Date: Wed, 30 Oct 2019 19:47:51 -0400 Subject: [PATCH] Added perm check for /kit command. --- .../java/com/songoda/ultimatekits/commands/CommandKit.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/songoda/ultimatekits/commands/CommandKit.java b/src/main/java/com/songoda/ultimatekits/commands/CommandKit.java index 018478d..1205526 100644 --- a/src/main/java/com/songoda/ultimatekits/commands/CommandKit.java +++ b/src/main/java/com/songoda/ultimatekits/commands/CommandKit.java @@ -44,6 +44,12 @@ public class CommandKit extends AbstractCommand { if (!(sender instanceof 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); return ReturnType.SUCCESS; } else if (args.length == 2) {