mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 18:45:27 +01:00
Broader restricted permission rewards check
This commit is contained in:
parent
4a3ecb4248
commit
5353139dd3
@ -967,33 +967,24 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
|||||||
if (s.startsWith("/")) {
|
if (s.startsWith("/")) {
|
||||||
s = s.substring(1);
|
s = s.substring(1);
|
||||||
}
|
}
|
||||||
switch (s.trim().split(" ")[0].toLowerCase()) {
|
final String[] arr = {
|
||||||
case "*":
|
"*",
|
||||||
case "*.*":
|
"bukkit.command",
|
||||||
case "bukkit.*":
|
"minecraft.command",
|
||||||
case "bukkit.command.*":
|
"worledit"
|
||||||
case "bukkit.command.plugins":
|
};
|
||||||
case "bukkit.command.reload":
|
boolean found = false;
|
||||||
case "bukkit.command.timings":
|
for (int i = 0; i < arr.length; i++) {
|
||||||
case "minecraft.*":
|
if (s.startsWith(arr[i])) {
|
||||||
case "minecraft.command.*":
|
found = true;
|
||||||
case "minecraft.command.ban":
|
break;
|
||||||
case "minecraft.command.ban-ip":
|
}
|
||||||
case "minecraft.command.deop":
|
}
|
||||||
case "minecraft.command.kick":
|
if (found) {
|
||||||
case "minecraft.command.kill":
|
|
||||||
case "minecraft.command.op":
|
|
||||||
case "minecraft.command.pardon":
|
|
||||||
case "minecraft.command.pardon-ip":
|
|
||||||
case "minecraft.command.save-all":
|
|
||||||
case "minecraft.command.save-off":
|
|
||||||
case "minecraft.command.save-on":
|
|
||||||
case "minecraft.command.stop":
|
|
||||||
case "minecraft.command.whitelist":
|
|
||||||
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidOption")
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidOption")
|
||||||
+ ChatColor.DARK_RED + " (" + s.trim() + ")");
|
+ ChatColor.DARK_RED + " (" + s.trim() + ")");
|
||||||
continue;
|
continue;
|
||||||
default:
|
} else {
|
||||||
permissions.add(s.trim());
|
permissions.add(s.trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user