mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-26 20:55:54 +01:00
Disallow use of some server disrupting command rewards, fixes #1410
This commit is contained in:
parent
cbb6d0941a
commit
88ccd1bd12
@ -76,6 +76,7 @@ public class ActionMainPrompt extends ActionsEditorNumericPrompt {
|
|||||||
case 4:
|
case 4:
|
||||||
case 5:
|
case 5:
|
||||||
case 6:
|
case 6:
|
||||||
|
return ChatColor.BLUE;
|
||||||
case 7:
|
case 7:
|
||||||
if (plugin.getDependencies().getDenizenApi() == null) {
|
if (plugin.getDependencies().getDenizenApi() == null) {
|
||||||
return ChatColor.GRAY;
|
return ChatColor.GRAY;
|
||||||
|
@ -753,7 +753,24 @@ public class RewardsPrompt extends QuestsEditorNumericPrompt {
|
|||||||
if (s.startsWith("/")) {
|
if (s.startsWith("/")) {
|
||||||
s = s.substring(1);
|
s = s.substring(1);
|
||||||
}
|
}
|
||||||
commands.add(s);
|
switch (s.trim().split(" ")[0].toLowerCase()) {
|
||||||
|
case "*":
|
||||||
|
case "op":
|
||||||
|
case "deop":
|
||||||
|
case "stop":
|
||||||
|
case "reload":
|
||||||
|
case "timings":
|
||||||
|
case "pardon":
|
||||||
|
case "pardon-ip":
|
||||||
|
case "ban":
|
||||||
|
case "ban-ip":
|
||||||
|
case "whitelist":
|
||||||
|
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("invalidOption")
|
||||||
|
+ ChatColor.DARK_RED + " (" + s.trim() + ")");
|
||||||
|
continue;
|
||||||
|
default:
|
||||||
|
commands.add(s.trim());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
context.setSessionData(CK.REW_COMMAND, commands.isEmpty() ? null : commands);
|
context.setSessionData(CK.REW_COMMAND, commands.isEmpty() ? null : commands);
|
||||||
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
} else if (input.equalsIgnoreCase(Lang.get("cmdClear"))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user