Merge pull request #9 from BlockCat/master

Start of: operation: letuserstranslatethepluginforus
This commit is contained in:
BlockCat 2013-08-06 23:45:48 -07:00
commit 08de2395df
3 changed files with 284 additions and 271 deletions

View File

@ -431,7 +431,7 @@ public class QuestFactory implements ConversationAbandonedListener, ColorUtil {
public String getPromptText(ConversationContext context) { public String getPromptText(ConversationContext context) {
String text = GOLD + "- Create Quest -\n"; String text = GOLD + "- Create Quest -\n";
text += AQUA + "Create new Quest " + GOLD + "- Enter a name for the Quest (Or enter \'cancel\' to return)"; text += AQUA + "Create new Quest " + GOLD + "- " + Lang.get("enterQuestName");
return text; return text;

View File

@ -69,6 +69,7 @@ import com.gmail.nossr50.datatypes.skills.SkillType;
public class Quests extends JavaPlugin implements ConversationAbandonedListener, ColorUtil { public class Quests extends JavaPlugin implements ConversationAbandonedListener, ColorUtil {
public final static Logger log = Logger.getLogger("Minecraft");
public static Economy economy = null; public static Economy economy = null;
public static Permission permission = null; public static Permission permission = null;
public static mcMMO mcmmo = null; public static mcMMO mcmmo = null;
@ -77,35 +78,35 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
public static boolean npcEffects = true; public static boolean npcEffects = true;
public static boolean broadcastPartyCreation = true; public static boolean broadcastPartyCreation = true;
public static int maxPartySize = 0; public static int maxPartySize = 0;
public static String effect = "note";
final List<String> questerBlacklist = new LinkedList<String>();
public ConversationFactory conversationFactory;
ConversationFactory NPCConversationFactory;
QuestFactory questFactory;
EventFactory eventFactory;
Vault vault = null;
public CitizensPlugin citizens;
PlayerListener pListener;
NpcEffectThread effListener;
NpcListener npcListener;
EpicBossListener bossListener;
public Denizen denizen = null;
QuestTaskTrigger trigger;
final Map<String, Quester> questers = new HashMap<String, Quester>();
final LinkedList<Quest> quests = new LinkedList<Quest>();
public final LinkedList<Event> events = new LinkedList<Event>();
final LinkedList<NPC> questNPCs = new LinkedList<NPC>();
boolean allowCommands = true;
boolean allowCommandsForNpcQuests = false;
boolean showQuestReqs = true;
boolean allowQuitting = true;
boolean debug = false;
boolean load = false;
int killDelay = 0;
public static int acceptTimeout = 20; public static int acceptTimeout = 20;
public static int inviteTimeout = 20; public static int inviteTimeout = 20;
int totalQuestPoints = 0; public static String effect = "note";
public final static Logger log = Logger.getLogger("Minecraft"); public final Map<String, Quester> questers = new HashMap<String, Quester>();
public final List<String> questerBlacklist = new LinkedList<String>();
public final LinkedList<Quest> quests = new LinkedList<Quest>();
public final LinkedList<Event> events = new LinkedList<Event>();
public final LinkedList<NPC> questNPCs = new LinkedList<NPC>();
public ConversationFactory conversationFactory;
public ConversationFactory NPCConversationFactory;
public QuestFactory questFactory;
public EventFactory eventFactory;
public Vault vault = null;
public CitizensPlugin citizens;
public PlayerListener pListener;
public NpcListener npcListener;
public EpicBossListener bossListener;
public NpcEffectThread effListener;
public Denizen denizen = null;
public QuestTaskTrigger trigger;
public boolean allowCommands = true;
public boolean allowCommandsForNpcQuests = false;
public boolean showQuestReqs = true;
public boolean allowQuitting = true;
public boolean debug = false;
public boolean load = false;
public int killDelay = 0;
public int totalQuestPoints = 0;
public Lang lang;
@Override @Override
public void onEnable() { public void onEnable() {
@ -180,7 +181,9 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
} }
loadConfig(); loadConfig();
Lang.initPhrases(); lang = new Lang(this);
lang.initPhrases();
lang.save();
if (new File(this.getDataFolder(), "quests.yml").exists() == false) { if (new File(this.getDataFolder(), "quests.yml").exists() == false) {
printInfo("[Quests] Quest data not found, writing default to file."); printInfo("[Quests] Quest data not found, writing default to file.");
@ -326,6 +329,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener,
debug = config.getBoolean("debug-mode"); debug = config.getBoolean("debug-mode");
killDelay = config.getInt("kill-delay"); killDelay = config.getInt("kill-delay");
acceptTimeout = config.getInt("accept-timeout"); acceptTimeout = config.getInt("accept-timeout");
if (config.contains("language")) {
Lang.lang = config.getString("language");
} else {
config.set("language", "en");
}
if(config.contains("broadcast-party-creation")){ if(config.contains("broadcast-party-creation")){
broadcastPartyCreation = config.getBoolean("broadcast-party-creation"); broadcastPartyCreation = config.getBoolean("broadcast-party-creation");

View File

@ -1,242 +1,246 @@
package me.blackvein.quests.util; package me.blackvein.quests.util;
import java.util.HashMap; import java.io.File;
import java.util.Map; import java.io.IOException;
import java.util.LinkedHashMap;
public class Lang { import java.util.Map;
import java.util.Map.Entry;
public static String lang = "en";
private static Map<String, String> en = new HashMap<String, String>(); import me.blackvein.quests.Quests;
private static Map<String, String> fr = new HashMap<String, String>();
private static Map<String, String> es = new HashMap<String, String>(); import org.bukkit.configuration.file.YamlConfiguration;
private static Map<String, String> de = new HashMap<String, String>();
private static Map<String, String> sv = new HashMap<String, String>(); public class Lang {
private static Map<String, String> nl = new HashMap<String, String>();
private static Map<String, String> pl = new HashMap<String, String>(); public static String lang = "en";
private static Map<String, String> da = new HashMap<String, String>();
private static Map<String, String> zh = new HashMap<String, String>(); private static Map<String, String> en = new LinkedHashMap<String, String>();
private static Map<String, String> no = new HashMap<String, String>();
private Quests plugin;
public static String get(String key){
public Lang (Quests plugin) {
if(lang.equals("en")) this.plugin = plugin;
return en.get(key); }
else if(lang.equals("fr"))
return fr.get(key); public static String get(String key){
else if(lang.equals("es")) return en.get(key);
return es.get(key); }
else if(lang.equals("de"))
return de.get(key); public void initPhrases(){
else if(lang.equals("sv"))
return sv.get(key); //English
else if(lang.equals("nl"))
return nl.get(key); //Quests
else if(lang.equals("pl")) en.put("enterQuestName", "Enter Quest name (or \"cancel\" to return)");
return pl.get(key);
else if(lang.equals("da"))
return da.get(key); //
else if(lang.equals("zh"))
return zh.get(key);
else if(lang.equals("no")) //Events
return no.get(key); en.put("eventEditorTitle", "Event Editor");
else en.put("eventEditorCreate", "Create new Event");
return en.get(key); en.put("eventEditorEdit", "Edit an Event");
en.put("eventEditorDelete", "Delete an Event");
}
en.put("eventEditorNoneToEdit", "No Events currently exist to be edited!");
public static void initPhrases(){ en.put("eventEditorNoneToDelete", "No Events currently exist to be deleted!");
en.put("eventEditorNotFound", "Event not found!");
//English en.put("eventEditorExists", "Event already exists!");
en.put("eventEditorSomeone", "Someone is already creating or editing an Event with that name!");
//Quests en.put("eventEditorAlpha", "Name must be alphanumeric!");
en.put("enterQuestName", "Enter Quest name (or \"cancel\" to return)");
en.put("eventEditorErrorReadingFile", "Error reading Events file.");
en.put("eventEditorErrorSaving", "An error occurred while saving.");
// en.put("eventEditorDeleted", "Event deleted, Quests and Events reloaded.");
en.put("eventEditorSaved", "Event saved, Quests and Events reloaded.");
//Events en.put("eventEditorEnterEventName", "Enter an Event name, or \"cancel\" to return.");
en.put("eventEditorTitle", "Event Editor"); en.put("eventEditorDeletePrompt", "Are you sure you want to delete the Event");
en.put("eventEditorCreate", "Create new Event"); en.put("eventEditorQuitWithoutSaving", "Are you sure you want to quit without saving?");
en.put("eventEditorEdit", "Edit an Event"); en.put("eventEditorFinishAndSave", "Are you sure you want to finish and save the Event");
en.put("eventEditorDelete", "Delete an Event"); en.put("eventEditorModifiedNote", "Note: You have modified an Event that the following Quests use:");
en.put("eventEditorForcedToQuit", "If you save the Event, anyone who is actively doing any of these Quests will be forced to quit them.");
en.put("eventEditorNoneToEdit", "No Events currently exist to be edited!");
en.put("eventEditorNoneToDelete", "No Events currently exist to be deleted!"); en.put("eventEditorEventInUse", "The following Quests use the Event");
en.put("eventEditorNotFound", "Event not found!"); en.put("eventEditorMustModifyQuests", "eventEditorNotFound");
en.put("eventEditorExists", "Event already exists!"); en.put("eventEditorListSizeMismatch", "The lists are not the same size!");
en.put("eventEditorSomeone", "Someone is already creating or editing an Event with that name!"); en.put("eventEditorListDuplicates", "List contains duplicates!");
en.put("eventEditorAlpha", "Name must be alphanumeric!"); en.put("eventEditorNotANumberList", "Input was not a list of numbers!");
en.put("eventEditorInvalidEntry", "Invalid entry");
en.put("eventEditorErrorReadingFile", "Error reading Events file.");
en.put("eventEditorErrorSaving", "An error occurred while saving."); en.put("eventEditorSetName", "Set name");
en.put("eventEditorDeleted", "Event deleted, Quests and Events reloaded."); en.put("eventEditorSetMessage", "Set message");
en.put("eventEditorSaved", "Event saved, Quests and Events reloaded.");
en.put("eventEditorEnterEventName", "Enter an Event name, or \"cancel\" to return.");
en.put("eventEditorDeletePrompt", "Are you sure you want to delete the Event"); en.put("eventEditorClearInv", "Clear player inventory");
en.put("eventEditorQuitWithoutSaving", "Are you sure you want to quit without saving?"); en.put("eventEditorSetExplosions", "Set explosion locations");
en.put("eventEditorFinishAndSave", "Are you sure you want to finish and save the Event"); en.put("eventEditorSetLightning", "Set lightning strike locations");
en.put("eventEditorModifiedNote", "Note: You have modified an Event that the following Quests use:"); en.put("eventEditorSetEffects", "Set effects");
en.put("eventEditorForcedToQuit", "If you save the Event, anyone who is actively doing any of these Quests will be forced to quit them."); en.put("eventEditorSetStorm", "Set storm");
en.put("eventEditorSetThunder", "Set thunder");
en.put("eventEditorEventInUse", "The following Quests use the Event"); en.put("eventEditorSetMobSpawns", "Set mob spawns");
en.put("eventEditorMustModifyQuests", "eventEditorNotFound"); en.put("eventEditorSetPotionEffects", "Set potion effects");
en.put("eventEditorListSizeMismatch", "The lists are not the same size!"); en.put("eventEditorSetHunger", "Set player hunger level");
en.put("eventEditorListDuplicates", "List contains duplicates!"); en.put("eventEditorSetSaturation", "Set player saturation level");
en.put("eventEditorNotANumberList", "Input was not a list of numbers!"); en.put("eventEditorSetHealth", "Set player health level");
en.put("eventEditorInvalidEntry", "Invalid entry"); en.put("eventEditorSetTeleport", "Set player teleport location");
en.put("eventEditorSetCommands", "Set commands to execute");
en.put("eventEditorSetName", "Set name");
en.put("eventEditorSetMessage", "Set message"); en.put("eventEditorItems", "Event Items");
en.put("eventEditorSetItems", "Give items");
en.put("eventEditorItemsCleared", "Event items cleared.");
en.put("eventEditorSetItemIDs", "Set item IDs");
en.put("eventEditorClearInv", "Clear player inventory"); en.put("eventEditorSetItemAmounts", "Set item amounts");
en.put("eventEditorSetExplosions", "Set explosion locations"); en.put("eventEditorNoIDs", "No IDs set");
en.put("eventEditorSetLightning", "Set lightning strike locations"); en.put("eventEditorMustSetIDs", "You must set item IDs first!");
en.put("eventEditorSetEffects", "Set effects"); en.put("eventEditorInvalidID", "___ is not a valid item ID!");
en.put("eventEditorSetStorm", "Set storm"); en.put("eventEditorNotGreaterThanZero", "___ is not greater than 0!");
en.put("eventEditorSetThunder", "Set thunder"); en.put("eventEditorNotANumber", "___ is not a number!");
en.put("eventEditorSetMobSpawns", "Set mob spawns");
en.put("eventEditorSetPotionEffects", "Set potion effects"); en.put("eventEditorStorm", "Event Storm");
en.put("eventEditorSetHunger", "Set player hunger level"); en.put("eventEditorSetWorld", "Set world");
en.put("eventEditorSetSaturation", "Set player saturation level"); en.put("eventEditorSetDuration", "Set duration");
en.put("eventEditorSetHealth", "Set player health level"); en.put("eventEditorNoWorld", "(No world set)");
en.put("eventEditorSetTeleport", "Set player teleport location"); en.put("eventEditorSetWorldFirst", "You must set a world first!");
en.put("eventEditorSetCommands", "Set commands to execute"); en.put("eventEditorInvalidWorld", "___ is not a valid world name!");
en.put("eventEditorMustSetStormDuration", "You must set a storm duration!");
en.put("eventEditorItems", "Event Items"); en.put("eventEditorStormCleared", "Storm data cleared.");
en.put("eventEditorSetItems", "Give items"); en.put("eventEditorEnterStormWorld", "Enter a world name for the storm to occur in, or enter \"cancel\" to return");
en.put("eventEditorItemsCleared", "Event items cleared."); en.put("eventEditorEnterDuration", "Enter duration (in milliseconds)");
en.put("eventEditorSetItemIDs", "Set item IDs"); en.put("eventEditorAtLeastOneSecond", "Amount must be at least 1 second! (1000 milliseconds)");
en.put("eventEditorSetItemAmounts", "Set item amounts"); en.put("eventEditorNotGreaterThanOneSecond", "___ is not greater than 1 second! (1000 milliseconds)");
en.put("eventEditorNoIDs", "No IDs set");
en.put("eventEditorMustSetIDs", "You must set item IDs first!"); en.put("eventEditorThunder", "Event Thunder");
en.put("eventEditorInvalidID", "___ is not a valid item ID!"); en.put("eventEditorInvalidWorld", "___ is not a valid world name!");
en.put("eventEditorNotGreaterThanZero", "___ is not greater than 0!"); en.put("eventEditorMustSetThunderDuration", "You must set a thunder duration!");
en.put("eventEditorNotANumber", "___ is not a number!"); en.put("eventEditorThunderCleared", "Thunder data cleared.");
en.put("eventEditorEnterThunderWorld", "Enter a world name for the thunder to occur in, or enter \"cancel\" to return");
en.put("eventEditorStorm", "Event Storm");
en.put("eventEditorSetWorld", "Set world"); en.put("eventEditorEffects", "Event Effects");
en.put("eventEditorSetDuration", "Set duration"); en.put("eventEditorAddEffect", "Add effect");
en.put("eventEditorNoWorld", "(No world set)"); en.put("eventEditorAddEffectLocation", "Add effect location");
en.put("eventEditorSetWorldFirst", "You must set a world first!"); en.put("eventEditorNoEffects", "No effects set");
en.put("eventEditorInvalidWorld", "___ is not a valid world name!"); en.put("eventEditorMustAddEffects", "You must add effects first!");
en.put("eventEditorMustSetStormDuration", "You must set a storm duration!"); en.put("eventEditorInvalidEffect", "___ is not a valid effect name!");
en.put("eventEditorStormCleared", "Storm data cleared."); en.put("eventEditorEffectsCleared", "Event effects cleared.");
en.put("eventEditorEnterStormWorld", "Enter a world name for the storm to occur in, or enter \"cancel\" to return"); en.put("eventEditorEffectLocationPrompt", "Right-click on a block to play an effect at, then enter \"add\" to add it to the list, or enter \"cancel\" to return");
en.put("eventEditorEnterDuration", "Enter duration (in milliseconds)");
en.put("eventEditorAtLeastOneSecond", "Amount must be at least 1 second! (1000 milliseconds)"); en.put("eventEditorMobSpawns", "Event Mob Spawns");
en.put("eventEditorNotGreaterThanOneSecond", "___ is not greater than 1 second! (1000 milliseconds)"); en.put("eventEditorSetMobTypes", "Set mob types");
en.put("eventEditorNoTypesSet", "(No types set)");
en.put("eventEditorThunder", "Event Thunder"); en.put("eventEditorMustSetMobTypesFirst", "You must set mob types first!");
en.put("eventEditorInvalidWorld", "___ is not a valid world name!"); en.put("eventEditorSetMobAmounts", "Set mob amounts");
en.put("eventEditorMustSetThunderDuration", "You must set a thunder duration!"); en.put("eventEditorNoAmountsSet", "(No amounts set)");
en.put("eventEditorThunderCleared", "Thunder data cleared."); en.put("eventEditorMustSetMobAmountsFirst", "You must set mob amounts first!");
en.put("eventEditorEnterThunderWorld", "Enter a world name for the thunder to occur in, or enter \"cancel\" to return"); en.put("eventEditorMustSetMobTypesAndAmountsFirst", "You must set mob types and amounts first!");
en.put("eventEditorAddSpawnLocation", "Add spawn location");
en.put("eventEditorEffects", "Event Effects"); en.put("eventEditorMobSpawnsCleared", "Mob spawns cleared.");
en.put("eventEditorAddEffect", "Add effect"); en.put("eventEditorInvalidMob", "___ is not a valid mob name!");
en.put("eventEditorAddEffectLocation", "Add effect location");
en.put("eventEditorNoEffects", "No effects set"); en.put("eventEditorLightningPrompt", "Right-click on a block to spawn a lightning strike at, then enter \"add\" to add it to the list, or enter \"clear\" to clear the locations list, or \"cancel\" to return");
en.put("eventEditorMustAddEffects", "You must add effects first!");
en.put("eventEditorInvalidEffect", "___ is not a valid effect name!"); en.put("eventEditorPotionEffects", "Event Potion Effects");
en.put("eventEditorEffectsCleared", "Event effects cleared."); en.put("eventEditorSetPotionEffects", "Set potion effect types");
en.put("eventEditorEffectLocationPrompt", "Right-click on a block to play an effect at, then enter \"add\" to add it to the list, or enter \"cancel\" to return"); en.put("eventEditorMustSetPotionTypesFirst", "You must set potion effect types first!");
en.put("eventEditorSetPotionDurations", "Set potion effect durations");
en.put("eventEditorMobSpawns", "Event Mob Spawns"); en.put("eventEditorMustSetPotionDurationsFirst", "You must set potion effect durations first!");
en.put("eventEditorSetMobTypes", "Set mob types"); en.put("eventEditorMustSetPotionTypesAndDurationsFirst", "You must set potion effect types and durations first!");
en.put("eventEditorNoTypesSet", "(No types set)"); en.put("eventEditorNoDurationsSet", "(No durations set)");
en.put("eventEditorMustSetMobTypesFirst", "You must set mob types first!"); en.put("eventEditorSetPotionMagnitudes", "Set potion effect magnitudes");
en.put("eventEditorSetMobAmounts", "Set mob amounts"); en.put("eventEditorPotionsCleared", "Potion effects cleared.");
en.put("eventEditorNoAmountsSet", "(No amounts set)"); en.put("eventEditorInvalidPotionType", "___ is not a valid potion effect type!");
en.put("eventEditorMustSetMobAmountsFirst", "You must set mob amounts first!");
en.put("eventEditorMustSetMobTypesAndAmountsFirst", "You must set mob types and amounts first!"); en.put("eventEditorEnterNPCId", "Enter NPC ID (or -1 to return)");
en.put("eventEditorAddSpawnLocation", "Add spawn location"); en.put("eventEditorNoNPCExists", "No NPC exists with that id!");
en.put("eventEditorMobSpawnsCleared", "Mob spawns cleared."); en.put("eventEditorExplosionPrompt", "Right-click on a block to spawn an explosion at, then enter \"add\" to add it to the list, or enter \"clear\" to clear the explosions list, or \"cancel\" to return");
en.put("eventEditorInvalidMob", "___ is not a valid mob name!"); en.put("eventEditorSelectBlockFirst", "You must select a block first.");
en.put("eventEditorSetMessagePrompt", "Enter message, or enter \'none\' to delete, (or \'cancel\' to return)");
en.put("eventEditorLightningPrompt", "Right-click on a block to spawn a lightning strike at, then enter \"add\" to add it to the list, or enter \"clear\" to clear the locations list, or \"cancel\" to return"); en.put("eventEditorSetItemIDsPrompt", "Enter item IDs separating each one by a space, or enter \"cancel\" to return.");
en.put("eventEditorSetItemAmountsPrompt", "Enter item amounts (numbers) separating each one by a space, or enter \"cancel\" to return.");
en.put("eventEditorPotionEffects", "Event Potion Effects"); en.put("eventEditorSetMobTypesPrompt", "Enter mob names separating each one by a space, or enter \"cancel\" to return");
en.put("eventEditorSetPotionEffects", "Set potion effect types"); en.put("eventEditorSetMobAmountsPrompt", "Enter mob amounts separating each one by a space, or enter \"cancel\" to return");
en.put("eventEditorMustSetPotionTypesFirst", "You must set potion effect types first!"); en.put("eventEditorMobLocationPrompt", "Right-click on a block to select it, then enter \"add\" to add it to the mob spawn location list, or enter \"cancel\" to return");
en.put("eventEditorSetPotionDurations", "Set potion effect durations"); en.put("eventEditorSetPotionEffectsPrompt", "Enter potion effect types separating each one by a space, or enter \"cancel\" to return");
en.put("eventEditorMustSetPotionDurationsFirst", "You must set potion effect durations first!"); en.put("eventEditorSetPotionDurationsPrompt", "Enter effect durations (in milliseconds) separating each one by a space, or enter \"cancel\" to return");
en.put("eventEditorMustSetPotionTypesAndDurationsFirst", "You must set potion effect types and durations first!"); en.put("eventEditorSetPotionMagnitudesPrompt", "Enter potion effect magnitudes separating each one by a space, or enter \"cancel\" to return");
en.put("eventEditorNoDurationsSet", "(No durations set)"); en.put("eventEditorSetHungerPrompt", "Enter hunger level, or -1 to remove it");
en.put("eventEditorSetPotionMagnitudes", "Set potion effect magnitudes"); en.put("eventEditorHungerLevelAtLeastZero", "Hunger level must be at least 0!");
en.put("eventEditorPotionsCleared", "Potion effects cleared."); en.put("eventEditorSetSaturationPrompt", "Enter saturation level, or -1 to remove it");
en.put("eventEditorInvalidPotionType", "___ is not a valid potion effect type!"); en.put("eventEditorSaturationLevelAtLeastZero", "Saturation level must be at least 0!");
en.put("eventEditorSetHealthPrompt", "Enter health level, or -1 to remove it");
en.put("eventEditorEnterNPCId", "Enter NPC ID (or -1 to return)"); en.put("eventEditorHealthLevelAtLeastZero", "Health level must be at least 0!");
en.put("eventEditorNoNPCExists", "No NPC exists with that id!"); en.put("eventEditorSetTeleportPrompt", "Right-click on a block to teleport the player to, then enter \"done\" to finish,\nor enter \"clear\" to clear the teleport location, or \"cancel\" to return");
en.put("eventEditorExplosionPrompt", "Right-click on a block to spawn an explosion at, then enter \"add\" to add it to the list, or enter \"clear\" to clear the explosions list, or \"cancel\" to return"); en.put("eventEditorCommandsNote", "Note: You may use <player> to refer to the player's name.");
en.put("eventEditorSelectBlockFirst", "You must select a block first."); en.put("eventEditorSetCommandsPrompt", "Enter commands separating each one by a comma, or enter \"clear\" to clear the list, or enter \"cancel\" to return.");
en.put("eventEditorSetMessagePrompt", "Enter message, or enter \'none\' to delete, (or \'cancel\' to return)"); en.put("eventEditorSet", "");
en.put("eventEditorSetItemIDsPrompt", "Enter item IDs separating each one by a space, or enter \"cancel\" to return."); //en.put("eventEditorSet", "");
en.put("eventEditorSetItemAmountsPrompt", "Enter item amounts (numbers) separating each one by a space, or enter \"cancel\" to return."); //en.put("eventEditorSet", "");
en.put("eventEditorSetMobTypesPrompt", "Enter mob names separating each one by a space, or enter \"cancel\" to return");
en.put("eventEditorSetMobAmountsPrompt", "Enter mob amounts separating each one by a space, or enter \"cancel\" to return");
en.put("eventEditorMobLocationPrompt", "Right-click on a block to select it, then enter \"add\" to add it to the mob spawn location list, or enter \"cancel\" to return"); //
en.put("eventEditorSetPotionEffectsPrompt", "Enter potion effect types separating each one by a space, or enter \"cancel\" to return");
en.put("eventEditorSetPotionDurationsPrompt", "Enter effect durations (in milliseconds) separating each one by a space, or enter \"cancel\" to return"); //Effects
en.put("eventEditorSetPotionMagnitudesPrompt", "Enter potion effect magnitudes separating each one by a space, or enter \"cancel\" to return"); en.put("effBlazeShoot", "Sound of a Blaze firing");
en.put("eventEditorSetHungerPrompt", "Enter hunger level, or -1 to remove it"); en.put("effBowFire", "Sound of a bow firing");
en.put("eventEditorHungerLevelAtLeastZero", "Hunger level must be at least 0!"); en.put("effClick1", "A click sound");
en.put("eventEditorSetSaturationPrompt", "Enter saturation level, or -1 to remove it"); en.put("effClick2", "A different click sound");
en.put("eventEditorSaturationLevelAtLeastZero", "Saturation level must be at least 0!"); en.put("effDoorToggle", "Sound of a door opening or closing");
en.put("eventEditorSetHealthPrompt", "Enter health level, or -1 to remove it"); en.put("effExtinguish", "Sound of fire being extinguished");
en.put("eventEditorHealthLevelAtLeastZero", "Health level must be at least 0!"); en.put("effGhastShoot", "Sound of a Ghast firing");
en.put("eventEditorSetTeleportPrompt", "Right-click on a block to teleport the player to, then enter \"done\" to finish,\nor enter \"clear\" to clear the teleport location, or \"cancel\" to return"); en.put("effGhastShriek", "Sound of a Ghast shrieking");
en.put("eventEditorCommandsNote", "Note: You may use <player> to refer to the player's name."); en.put("effZombieWood", "Sound of a Zombie chewing an iron door");
en.put("eventEditorSetCommandsPrompt", "Enter commands separating each one by a comma, or enter \"clear\" to clear the list, or enter \"cancel\" to return."); en.put("effZombieIron", "Sound of a Zombie chewing a wooden door");
en.put("eventEditorSet", ""); en.put("effEnterName", "Enter an effect name to add it to the list, or enter \"cancel\" to return");
en.put("eventEditorSet", "");
en.put("eventEditorSet", ""); //
//Inputs
// en.put("cmdCancel", "cancel");
en.put("cmdAdd", "add");
//Effects en.put("cmdClear", "clear");
en.put("effBlazeShoot", "Sound of a Blaze firing"); en.put("cmdNone", "none");
en.put("effBowFire", "Sound of a bow firing"); en.put("cmdDone", "done");
en.put("effClick1", "A click sound"); //
en.put("effClick2", "A different click sound");
en.put("effDoorToggle", "Sound of a door opening or closing"); //Misc
en.put("effExtinguish", "Sound of fire being extinguished"); en.put("event", "Event");
en.put("effGhastShoot", "Sound of a Ghast firing"); en.put("exit", "Exit");
en.put("effGhastShriek", "Sound of a Ghast shrieking"); en.put("exited", "Exited.");
en.put("effZombieWood", "Sound of a Zombie chewing an iron door"); en.put("yes", "Yes");
en.put("effZombieIron", "Sound of a Zombie chewing a wooden door"); en.put("no", "No");
en.put("effEnterName", "Enter an effect name to add it to the list, or enter \"cancel\" to return"); en.put("done", "Done");
en.put("quit", "Quit");
// en.put("clear", "Clear");
en.put("noneSet", "None set");
//Inputs en.put("worlds", "Worlds");
en.put("cmdCancel", "cancel"); en.put("mobs", "Mobs");
en.put("cmdAdd", "add"); en.put("invalidOption", "Invalid option!");
en.put("cmdClear", "clear"); //
en.put("cmdNone", "none"); //
en.put("cmdDone", "done");
// File file = new File(plugin.getDataFolder(), "/lang/" + lang + ".yml");
YamlConfiguration langFile = YamlConfiguration.loadConfiguration(file);
//Misc
en.put("event", "Event"); for (Entry<String, Object> e : langFile.getValues(true).entrySet()) {
en.put("exit", "Exit"); en.put(e.getKey(), (String) e.getValue());
en.put("exited", "Exited."); }
en.put("yes", "Yes");
en.put("no", "No"); }
en.put("done", "Done");
en.put("quit", "Quit"); public void save() {
en.put("clear", "Clear"); File file = new File(plugin.getDataFolder(), "/lang/" + lang + ".yml");
en.put("noneSet", "None set"); YamlConfiguration langFile = YamlConfiguration.loadConfiguration(file);
en.put("worlds", "Worlds");
en.put("mobs", "Mobs"); for (Entry<String, String> e : en.entrySet()) {
en.put("invalidOption", "Invalid option!"); langFile.set(e.getKey(), e.getValue());
// }
//
try {
} langFile.save(file);
} } catch (IOException e1) {
e1.printStackTrace();
}
}
}