Add notice for Trial Mode at menus

This commit is contained in:
PikaMug 2021-10-19 04:42:04 -04:00
parent 21e6c03d7b
commit 826d5883e1
4 changed files with 18 additions and 6 deletions

View File

@ -51,7 +51,9 @@ public class ActionMenuPrompt extends ActionsEditorNumericPrompt {
@Override
public String getTitle(final ConversationContext context) {
return Lang.get("eventEditorTitle");
final String title = Lang.get("eventEditorTitle");
return title + (plugin.hasLimitedAccess(context.getForWhom()) ? ChatColor.RED + " (" + Lang.get("trialMode")
+ ")" : "");
}
@Override

View File

@ -51,7 +51,9 @@ public class ConditionMenuPrompt extends ConditionsEditorNumericPrompt {
@Override
public String getTitle(final ConversationContext context) {
return Lang.get("conditionEditorTitle");
final String title = Lang.get("conditionEditorTitle");
return title + (plugin.hasLimitedAccess(context.getForWhom()) ? ChatColor.RED + " (" + Lang.get("trialMode")
+ ")" : "");
}
@Override

View File

@ -69,9 +69,15 @@ public class QuestMainPrompt extends QuestsEditorNumericPrompt {
@Override
public String getTitle(final ConversationContext context) {
return Lang.get("quest") + ": " + context.getSessionData(CK.Q_NAME) + "" + ChatColor.GRAY
+ (context.getSessionData(CK.Q_ID) != null ? " (" + Lang.get("id") + ":"
+ context.getSessionData(CK.Q_ID) + ")": "");
final StringBuilder title = new StringBuilder(Lang.get("quest") + ": " + context.getSessionData(CK.Q_NAME));
if (plugin.hasLimitedAccess(context.getForWhom())) {
title.append(ChatColor.RED).append(" (").append(Lang.get("trialMode")).append(")");
} else if (context.getSessionData(CK.Q_ID) != null) {
title.append(ChatColor.GRAY).append(" (").append(Lang.get("id")).append(":")
.append(context.getSessionData(CK.Q_ID)).append(")");
}
return title.toString();
}
@Override

View File

@ -49,7 +49,9 @@ public class QuestMenuPrompt extends QuestsEditorNumericPrompt {
@Override
public String getTitle(final ConversationContext context) {
return Lang.get("questEditorTitle");
final String title = Lang.get("questEditorTitle");
return title + (plugin.hasLimitedAccess(context.getForWhom()) ? ChatColor.RED + " (" + Lang.get("trialMode")
+ ")" : "");
}
@Override