mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-13 22:25:50 +01:00
Supply external conversation hooks, part 37
This commit is contained in:
parent
4a9c2e898b
commit
5cfff53215
@ -90,8 +90,10 @@ public class ActionMenuPrompt extends ActionsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final ActionsEditorPostOpenNumericPromptEvent event = new ActionsEditorPostOpenNumericPromptEvent(context, this);
|
||||
final ActionsEditorPostOpenNumericPromptEvent event
|
||||
= new ActionsEditorPostOpenNumericPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GOLD + getTitle(context);
|
||||
for (int i = 1; i <= size; i++) {
|
||||
text += "\n" + getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||
@ -166,7 +168,8 @@ public class ActionMenuPrompt extends ActionsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final ActionsEditorPostOpenStringPromptEvent event = new ActionsEditorPostOpenStringPromptEvent(context, this);
|
||||
final ActionsEditorPostOpenStringPromptEvent event
|
||||
= new ActionsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
final String text = ChatColor.GOLD + getTitle(context) + "\n" + ChatColor.YELLOW + getQueryText(context);
|
||||
@ -228,6 +231,10 @@ public class ActionMenuPrompt extends ActionsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final ActionsEditorPostOpenStringPromptEvent event
|
||||
= new ActionsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GOLD + getTitle(context) + "\n";
|
||||
for (final Action a : plugin.getActions()) {
|
||||
text += ChatColor.AQUA + a.getName() + ChatColor.GRAY + ", ";
|
||||
@ -273,6 +280,10 @@ public class ActionMenuPrompt extends ActionsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final ActionsEditorPostOpenStringPromptEvent event
|
||||
= new ActionsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GOLD + getTitle(context) + "\n";
|
||||
for (final Action a : plugin.getActions()) {
|
||||
text += ChatColor.AQUA + a.getName() + ChatColor.GRAY + ",";
|
||||
@ -337,6 +348,10 @@ public class ActionMenuPrompt extends ActionsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final ActionsEditorPostOpenStringPromptEvent event
|
||||
= new ActionsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GREEN + "" + ChatColor.BOLD + "1" + ChatColor.RESET + "" + ChatColor.GREEN + " - "
|
||||
+ Lang.get("yesWord") + "\n";
|
||||
text += ChatColor.RED + "" + ChatColor.BOLD + "2" + ChatColor.RESET + "" + ChatColor.RED + " - "
|
||||
|
@ -90,8 +90,10 @@ public class ConditionMenuPrompt extends ConditionsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final ConditionsEditorPostOpenNumericPromptEvent event = new ConditionsEditorPostOpenNumericPromptEvent(context, this);
|
||||
final ConditionsEditorPostOpenNumericPromptEvent event
|
||||
= new ConditionsEditorPostOpenNumericPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GOLD + getTitle(context);
|
||||
for (int i = 1; i <= size; i++) {
|
||||
text += "\n" + getNumberColor(context, i) + "" + ChatColor.BOLD + i + ChatColor.RESET + " - "
|
||||
@ -164,7 +166,8 @@ public class ConditionMenuPrompt extends ConditionsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final ConditionsEditorPostOpenStringPromptEvent event = new ConditionsEditorPostOpenStringPromptEvent(context, this);
|
||||
final ConditionsEditorPostOpenStringPromptEvent event
|
||||
= new ConditionsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
final String text = ChatColor.GOLD + getTitle(context) + "\n" + ChatColor.YELLOW + getQueryText(context);
|
||||
@ -226,6 +229,10 @@ public class ConditionMenuPrompt extends ConditionsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final ConditionsEditorPostOpenStringPromptEvent event
|
||||
= new ConditionsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GOLD + getTitle(context) + "\n";
|
||||
for (final Condition a : plugin.getConditions()) {
|
||||
text += ChatColor.AQUA + a.getName() + ChatColor.GRAY + ", ";
|
||||
@ -271,6 +278,10 @@ public class ConditionMenuPrompt extends ConditionsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final ConditionsEditorPostOpenStringPromptEvent event
|
||||
= new ConditionsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GOLD + getTitle(context) + "\n";
|
||||
for (final Condition c : plugin.getConditions()) {
|
||||
text += ChatColor.AQUA + c.getName() + ChatColor.GRAY + ",";
|
||||
@ -335,10 +346,14 @@ public class ConditionMenuPrompt extends ConditionsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final ConditionsEditorPostOpenStringPromptEvent event
|
||||
= new ConditionsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GREEN + "" + ChatColor.BOLD + "1" + ChatColor.RESET + "" + ChatColor.GREEN + " - "
|
||||
+ Lang.get("yesWord") + "\n";
|
||||
+ Lang.get("yesWord") + "\n";
|
||||
text += ChatColor.RED + "" + ChatColor.BOLD + "2" + ChatColor.RESET + "" + ChatColor.RED + " - "
|
||||
+ Lang.get("noWord");
|
||||
+ Lang.get("noWord");
|
||||
return ChatColor.RED + Lang.get("confirmDelete") + " (" + ChatColor.YELLOW
|
||||
+ (String) context.getSessionData(CK.ED_CONDITION_DELETE) + ChatColor.RED + ")\n" + text;
|
||||
}
|
||||
|
@ -88,7 +88,8 @@ public class QuestMenuPrompt extends QuestsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final QuestsEditorPostOpenNumericPromptEvent event = new QuestsEditorPostOpenNumericPromptEvent(context, this);
|
||||
final QuestsEditorPostOpenNumericPromptEvent event
|
||||
= new QuestsEditorPostOpenNumericPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
String text = ChatColor.GOLD + getTitle(context);
|
||||
for (int i = 1; i <= size; i++) {
|
||||
@ -149,7 +150,8 @@ public class QuestMenuPrompt extends QuestsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final QuestsEditorPostOpenStringPromptEvent event = new QuestsEditorPostOpenStringPromptEvent(context, this);
|
||||
final QuestsEditorPostOpenStringPromptEvent event
|
||||
= new QuestsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
final String text = ChatColor.GOLD + getTitle(context)+ "\n" + ChatColor.YELLOW + getQueryText(context);
|
||||
@ -213,6 +215,10 @@ public class QuestMenuPrompt extends QuestsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final QuestsEditorPostOpenStringPromptEvent event
|
||||
= new QuestsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GOLD + getTitle(context);
|
||||
for (final Quest q : plugin.getQuests()) {
|
||||
text += "\n" + ChatColor.GRAY + "- " + ChatColor.AQUA + q.getName();
|
||||
@ -253,6 +259,10 @@ public class QuestMenuPrompt extends QuestsEditorNumericPrompt {
|
||||
|
||||
@Override
|
||||
public String getPromptText(final ConversationContext context) {
|
||||
final QuestsEditorPostOpenStringPromptEvent event
|
||||
= new QuestsEditorPostOpenStringPromptEvent(context, this);
|
||||
plugin.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
String text = ChatColor.GOLD + getTitle(context) + "\n";
|
||||
for (final Quest quest : plugin.getQuests()) {
|
||||
text += ChatColor.AQUA + quest.getName() + ChatColor.GRAY + ",";
|
||||
|
Loading…
Reference in New Issue
Block a user