Updated version to 1.0 and added command permission

This commit is contained in:
5vl 2022-05-30 15:45:45 +02:00
parent 4851d25071
commit 848dc59a85
No known key found for this signature in database
GPG Key ID: DA8938F22548E4D5
2 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,7 @@
<groupId>me.fivevl</groupId>
<artifactId>troll</artifactId>
<version>1</version>
<version>1.0</version>
<packaging>jar</packaging>
<name>Troll</name>

View File

@ -15,6 +15,10 @@ class TrollCommand : CommandExecutor {
return true
}
val p = sender.player!!
if (!p.hasPermission("troll.use")) {
p.sendMessage(Utils.color("<red>You don't have permission to use this command!</red>"))
return true
}
if (args == null || args.size != 1) {
p.sendMessage(Utils.color("<red>Usage: /troll <player></red>"))
return true