diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee3d5d3..8e03b28 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "UltimateKits" path: "/builds/$CI_PROJECT_PATH" - version: "2.4.6" + version: "2.4.7" build: stage: build diff --git a/src/main/java/com/songoda/ultimatekits/UltimateKits.java b/src/main/java/com/songoda/ultimatekits/UltimateKits.java index 0c5820b..875b8b5 100644 --- a/src/main/java/com/songoda/ultimatekits/UltimateKits.java +++ b/src/main/java/com/songoda/ultimatekits/UltimateKits.java @@ -108,6 +108,7 @@ public class UltimateKits extends SongodaPlugin { // load kits dataFile.load(); + keyFile.load(); checkKeyDefaults(); loadKits(); keyFile.saveChanges(); 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) {