* Fix for Citizens

* Fix language mistakes
This commit is contained in:
Zino 2013-08-09 12:52:11 +02:00
parent 043cf538d0
commit 148ae5ea99
4 changed files with 28 additions and 28 deletions

View File

@ -26,14 +26,14 @@ public class NpcEffectThread implements Runnable{
if(nearby.isEmpty() == false){
for(Entity e : nearby){
if(plugin.citizens.getNPCRegistry().isNPC(e)){
NPC npc = plugin.citizens.getNPCRegistry().getNPC(e);
if(plugin.hasQuest(npc, quester))
showEffect(player, npc);
}
if(plugin.citizens != null)
if(plugin.citizens.getNPCRegistry().isNPC(e)){
NPC npc = plugin.citizens.getNPCRegistry().getNPC(e);
if(plugin.hasQuest(npc, quester))
showEffect(player, npc);
}
}

View File

@ -430,8 +430,8 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
@Override
public String getPromptText(ConversationContext context) {
String text = GOLD + "- " + Lang.get("questCreateHeader") + " -\n";
text += AQUA + Lang.get("questCreateNew") + " " + GOLD + "- " + Lang.get("enterQuestName");
String text = GOLD + "- " + Lang.get("questEditorHeader") + " -\n";
text += AQUA + Lang.get("questEditorCreate") + " " + GOLD + "- " + Lang.get("questEditorEnterQuestName");
return text;
@ -446,7 +446,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
if (q.name.equalsIgnoreCase(input)) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questNameExists"));
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorNameExists"));
return new QuestNamePrompt();
}
@ -455,14 +455,14 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
if (names.contains(input)) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questBeingEdited"));
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorBeingEdited"));
return new QuestNamePrompt();
}
if (input.contains(",")) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questNameContainsCommas"));
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorInvalidQuestName"));
return new QuestNamePrompt();
}
@ -485,7 +485,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
@Override
public String getPromptText(ConversationContext context) {
return ChatColor.YELLOW + Lang.get("enterNPCStart");
return ChatColor.YELLOW + Lang.get("questEditorEnterQuestName");
}
@ -495,7 +495,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
if (input.intValue() > -1) {
if (CitizensAPI.getNPCRegistry().getById(input.intValue()) == null) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("npcNonExistant"));
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorInvalidNPC"));
return new SetNpcStartPrompt();
}
@ -508,7 +508,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
} else if (input.intValue() == -2) {
return new CreateMenuPrompt();
} else {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("npcNonExistant"));
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorInvalidNPC"));
return new SetNpcStartPrompt();
}
@ -520,7 +520,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
@Override
public String getPromptText(ConversationContext context) {
return ChatColor.YELLOW + Lang.get("enterBlockStart");
return ChatColor.YELLOW + Lang.get("questEditorEnterBlockStart");
}
@ -538,7 +538,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
context.setSessionData(CK.Q_START_BLOCK, loc);
selectedBlockStarts.remove(player);
} else {
player.sendMessage(ChatColor.RED + Lang.get("blockNotSelected"));
player.sendMessage(ChatColor.RED + Lang.get("questEditorNoStartBlockSelected"));
return new BlockStartPrompt();
}
@ -567,7 +567,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
@Override
public String getPromptText(ConversationContext context) {
return ChatColor.YELLOW + Lang.get("enterQuestName");
return ChatColor.YELLOW + Lang.get("questEditorEnterQuestName");
}
@ -585,7 +585,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
}
if (s != null && s.equalsIgnoreCase(input) == false) {
context.getForWhom().sendRawMessage(RED + Lang.get("questNameExists"));
context.getForWhom().sendRawMessage(RED + Lang.get("questEditorNameExists"));
return new SetNamePrompt();
}
}
@ -593,13 +593,13 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
}
if (names.contains(input)) {
context.getForWhom().sendRawMessage(RED + Lang.get("questBeingEdited"));
context.getForWhom().sendRawMessage(RED + Lang.get("questEditorBeingEdited"));
return new SetNamePrompt();
}
if (input.contains(",")) {
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questNameContainsCommas"));
context.getForWhom().sendRawMessage(ChatColor.RED + Lang.get("questEditorInvalidQuestName"));
return new QuestNamePrompt();
}
@ -620,7 +620,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
@Override
public String getPromptText(ConversationContext context) {
return ChatColor.YELLOW + Lang.get("enterAskMessage");
return ChatColor.YELLOW + Lang.get("questEditorEnterAskMessage");
}
@ -647,7 +647,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
@Override
public String getPromptText(ConversationContext context) {
return ChatColor.YELLOW + Lang.get("enterFinishMessage");
return ChatColor.YELLOW + Lang.get("questEditorEnterFinishMessage");
}

View File

@ -3788,7 +3788,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
player.sendMessage(YELLOW + "Start message cleared.");
return new CreateStagePrompt(stageNum, questFactory, citizens);
} else {
return new StartMessagePrompt();
return new CreateStagePrompt(stageNum, questFactory, citizens);
}
}
@ -3817,7 +3817,7 @@ public class CreateStagePrompt extends FixedSetPrompt implements ColorUtil {
player.sendMessage(YELLOW + "Complete message cleared.");
return new CreateStagePrompt(stageNum, questFactory, citizens);
} else {
return new CompleteMessagePrompt();
return new CreateStagePrompt(stageNum, questFactory, citizens);
}
}

View File

@ -45,7 +45,7 @@ public class Lang {
en.put("questEditorBlockStart", "Set Block start");
en.put("questEditorInitialEvent", "Set initial Event");
en.put("questEditorReqs", "Edit Requirements");
en.put("questEditorStages", "Edit Stage");
en.put("questEditorStages", "Edit Stages");
en.put("questEditorRews", "Edit Rewards");
en.put("questEditorEnterQuestName", "Enter Quest name (or \"cancel\" to return)");
@ -255,7 +255,7 @@ public class Lang {
//Misc
en.put("event", "Event");
en.put("save", "save");
en.put("save", "Save");
en.put("exit", "Exit");
en.put("exited", "Exited.");
en.put("yes", "Yes");