From 848dc59a85c3e966c4ea31ef6ebce33845f37bc8 Mon Sep 17 00:00:00 2001 From: 5vl Date: Mon, 30 May 2022 15:45:45 +0200 Subject: [PATCH] Updated version to 1.0 and added command permission --- pom.xml | 2 +- src/main/java/me/fivevl/troll/commands/TrollCommand.kt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2a29b2b..50cb78c 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.fivevl troll - 1 + 1.0 jar Troll diff --git a/src/main/java/me/fivevl/troll/commands/TrollCommand.kt b/src/main/java/me/fivevl/troll/commands/TrollCommand.kt index 4e6a0f8..9522110 100644 --- a/src/main/java/me/fivevl/troll/commands/TrollCommand.kt +++ b/src/main/java/me/fivevl/troll/commands/TrollCommand.kt @@ -15,6 +15,10 @@ class TrollCommand : CommandExecutor { return true } val p = sender.player!! + if (!p.hasPermission("troll.use")) { + p.sendMessage(Utils.color("You don't have permission to use this command!")) + return true + } if (args == null || args.size != 1) { p.sendMessage(Utils.color("Usage: /troll ")) return true