diff --git a/pom.xml b/pom.xml index 935ece1..3d293bb 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ co.uk.legendeffects openafk - 1.1.1 + 1.1.2 jar OpenAFK diff --git a/src/main/java/co/uk/legendeffects/openafk/commands/AFKCommand.java b/src/main/java/co/uk/legendeffects/openafk/commands/AFKCommand.java index 6f21319..f263573 100644 --- a/src/main/java/co/uk/legendeffects/openafk/commands/AFKCommand.java +++ b/src/main/java/co/uk/legendeffects/openafk/commands/AFKCommand.java @@ -21,6 +21,11 @@ public boolean onCommand(CommandSender sender, Command command, String label, St Player player = (Player) sender; + if(!player.hasPermission("openafk.afk")) { + sender.sendMessage(OpenAFK.parse(player, plugin.getConfig().getString("messages.insufficientPermissions"))); + return true; + } + if(plugin.isAfkPlayer(player)) { plugin.makePlayerReturn(player, ActionType.RETURN_BY_COMMAND, "onReturnCMD"); return true;