1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-07 00:38:42 +01:00

Add permissions for quests start & stop

This commit is contained in:
montlikadani 2020-04-17 08:46:13 +02:00
parent 97ee33e46e
commit 05b1122d66
2 changed files with 11 additions and 4 deletions

View File

@ -55,9 +55,9 @@ public class quests implements Cmd {
if (args.length >= 1) { if (args.length >= 1) {
Boolean stopped = null; Boolean stopped = null;
String cmd = args.length == 1 ? args[0] : args[1]; String cmd = args.length == 1 ? args[0] : args[1];
if (cmd.equalsIgnoreCase("stop")) { if (cmd.equalsIgnoreCase("stop") && Jobs.hasPermission(sender, "jobs.command.admin.quests.stop", false)) {
stopped = true; stopped = true;
} else if (cmd.equalsIgnoreCase("start")) { } else if (cmd.equalsIgnoreCase("start") && Jobs.hasPermission(sender, "jobs.command.admin.quests.start", false)) {
stopped = false; stopped = false;
} }

View File

@ -28,6 +28,15 @@ permissions:
jobs.use: jobs.use:
description: Grants ability to use this plugin description: Grants ability to use this plugin
default: true default: true
jobs.command.admin.*:
description: Grants player access to all commands
default: false
children:
jobs.command.*: true
jobs.command.admin.stats: true
jobs.command.admin.archive: true
jobs.command.admin.quests.stop: true
jobs.command.admin.quests.start: true
jobs.command.*: jobs.command.*:
description: Grants player access to all commands description: Grants player access to all commands
default: false default: false
@ -35,8 +44,6 @@ permissions:
jobs.command.archive: true jobs.command.archive: true
jobs.command.browse: true jobs.command.browse: true
jobs.command.stats: true jobs.command.stats: true
jobs.command.admin.stats: true
jobs.command.admin.archive: true
jobs.command.archive: true jobs.command.archive: true
jobs.command.join: true jobs.command.join: true
jobs.command.leave: true jobs.command.leave: true