Fix permissions

This commit is contained in:
Minecon724 2024-10-24 15:28:11 +02:00
parent bfc4649f80
commit 9c854f732d
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
3 changed files with 7 additions and 2 deletions

View file

@ -53,7 +53,7 @@
<dependency> <dependency>
<groupId>eu.m724</groupId> <groupId>eu.m724</groupId>
<artifactId>jarupdater</artifactId> <artifactId>jarupdater</artifactId>
<version>0.1.2</version> <version>0.1.3</version>
</dependency> </dependency>
</dependencies> </dependencies>

View file

@ -51,6 +51,11 @@ public class UpdateCommand {
} else { } else {
String action = args[1]; // remember this function is proxied String action = args[1]; // remember this function is proxied
if (!sender.hasPermission("giants.update." + action)) {
sender.sendMessage("You don't have permission to use this command, or it doesn't exist.");
return true;
}
if (action.equals("download")) { if (action.equals("download")) {
sender.sendMessage("Started download"); sender.sendMessage("Started download");

View file

@ -20,7 +20,7 @@ permissions:
description: Permits /giants update. Doesn't permit installing update, giants.update for that description: Permits /giants update. Doesn't permit installing update, giants.update for that
default: op default: op
giants.update.downloading: giants.update.download:
description: Permits DOWNLOADING the latest update of the Giants plugin. description: Permits DOWNLOADING the latest update of the Giants plugin.
default: op default: op
giants.update.install: giants.update.install: