Change Trial Mode permission node

This commit is contained in:
PikaMug 2021-10-06 01:09:44 -04:00
parent d5f3f7f10e
commit 8c2b077786
3 changed files with 9 additions and 10 deletions

View File

@ -4180,13 +4180,13 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
* Checks if conversable is player in trial mode
*
* @param conversable the editor user to be checked
* @return {@code true} if user is a Player with quests.admin.trial permission
* @return {@code true} if user is a Player with quests.mode.trial permission
*/
public boolean hasLimitedAccess(final Conversable conversable) {
if (!(conversable instanceof Player)) {
return false;
}
return ((Player)conversable).hasPermission("quests.admin.trial");
return ((Player)conversable).hasPermission("quests.mode.trial");
}
/**

View File

@ -491,7 +491,7 @@ public class CmdExecutor implements CommandExecutor {
private boolean questsActions(final CommandSender cs) {
if (cs.hasPermission("quests.events.*") || cs.hasPermission("quests.actions.*")
|| cs.hasPermission("quests.actions.editor") || cs.hasPermission("quests.events.editor")
|| cs.hasPermission("quests.admin.trial")) {
|| cs.hasPermission("quests.mode.trial")) {
final Conversable c = (Conversable) cs;
if (!c.isConversing()) {
plugin.getActionFactory().getConversationFactory().buildConversation(c).begin();
@ -506,7 +506,7 @@ public class CmdExecutor implements CommandExecutor {
private boolean questsConditions(final CommandSender cs) {
if (cs.hasPermission("quests.conditions.*") || cs.hasPermission("quests.conditions.editor")
|| cs.hasPermission("quests.admin.trial")) {
|| cs.hasPermission("quests.mode.trial")) {
final Conversable c = (Conversable) cs;
if (!c.isConversing()) {
plugin.getConditionFactory().getConversationFactory().buildConversation(c).begin();
@ -521,7 +521,7 @@ public class CmdExecutor implements CommandExecutor {
private boolean questsEditor(final CommandSender cs) {
if (cs.hasPermission("quests.editor.*") || cs.hasPermission("quests.editor.editor")
|| cs.hasPermission("quests.admin.trial")) {
|| cs.hasPermission("quests.mode.trial")) {
final Conversable c = (Conversable) cs;
if (!c.isConversing()) {
final Conversation cn = plugin.getQuestFactory().getConversationFactory().buildConversation(c);
@ -852,20 +852,20 @@ public class CmdExecutor implements CommandExecutor {
: "top") + ChatColor.YELLOW));
}
if (cs.hasPermission("quests.editor.*") || cs.hasPermission("quests.editor.editor")
|| cs.hasPermission("quests.admin.trial")) {
|| cs.hasPermission("quests.mode.trial")) {
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_EDITOR_HELP")
.replace("<command>", ChatColor.GOLD + (translateSubCommands ? Lang.get("COMMAND_EDITOR")
: "editor") + ChatColor.YELLOW));
}
if (cs.hasPermission("quests.events.*") || cs.hasPermission("quests.actions.*")
|| cs.hasPermission("quests.events.editor") || cs.hasPermission("quests.actions.editor")
|| cs.hasPermission("quests.admin.trial")) {
|| cs.hasPermission("quests.mode.trial")) {
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_EVENTS_EDITOR_HELP")
.replace("<command>", ChatColor.GOLD + (translateSubCommands
? Lang.get("COMMAND_EVENTS_EDITOR") : "actions") + ChatColor.YELLOW));
}
if (cs.hasPermission("quests.conditions.*") || cs.hasPermission("quests.conditions.editor")
|| cs.hasPermission("quests.admin.trial")) {
|| cs.hasPermission("quests.mode.trial")) {
cs.sendMessage(ChatColor.YELLOW + "/quests " + Lang.get("COMMAND_CONDITIONS_EDITOR_HELP")
.replace("<command>", ChatColor.GOLD + (translateSubCommands
? Lang.get("COMMAND_CONDITIONS_EDITOR") : "conditions") + ChatColor.YELLOW));

View File

@ -79,7 +79,6 @@ permissions:
quests.admin.reload: true
quests.admin.drop: true
quests.admin.update: true
quests.admin.trial: false
quests.admin:
description: Display administrator help
default: op
@ -128,7 +127,7 @@ permissions:
quests.admin.update:
description: Permit viewing of update check notices
default: op
quests.admin.trial:
quests.mode.trial:
description: Limit access to sensitive editor prompts
default: false
quests.editor.*: