Changed some config settings and descriptions

This commit is contained in:
Sn0wStorm
2016-05-26 21:10:48 +02:00
parent d5296bdc8c
commit 85acdcdbb6
8 changed files with 283 additions and 51 deletions
+210 -1
View File
@@ -125,7 +125,16 @@ public class ConfigUpdater {
fromVersion = "1.3.1";
}
if (!fromVersion.equals("1.3.1")) {
if (fromVersion.equals("1.3.1")) {
if (lang.equals("de")) {
update131de();
} else {
update131en();
}
fromVersion = "1.4";
}
if (!fromVersion.equals("1.4")) {
P.p.log(P.p.languageReader.get("Error_ConfigUpdate", fromVersion));
return;
}
@@ -593,6 +602,7 @@ public class ConfigUpdater {
}
// Update de from 1.3 to 1.3.1
private void update13de() {
updateVersion("1.3.1");
@@ -617,6 +627,8 @@ public class ConfigUpdater {
addLines(index, lines);
}
}
// Update en from 1.3 to 1.3.1
private void update13en() {
updateVersion("1.3.1");
@@ -642,5 +654,202 @@ public class ConfigUpdater {
}
}
// Update de from 1.3.1 to 1.4
private void update131de() {
updateVersion("1.4");
int index = indexOfStart("# SamplePlugin = installiertes home plugin. Unterstützt: ManagerXL.");
if (index != -1) {
config.remove(index);
}
index = indexOfStart("# Ob der Spieler nach etwas kürzerem Ausloggen an einem zufälligen Ort \"aufwacht\" (diese müssen durch '/br Wakeup add");
if (index != -1) {
setLine(index, "# Ob der Spieler nach etwas kürzerem Ausloggen an einem zufälligen Ort \"aufwacht\" (diese müssen durch '/brew Wakeup add' von einem Admin festgelegt werden)");
}
index = indexOfStart("# Ob der Spieler sich bei großer Trunkenheit teilweise nicht einloggen kann und kurz warten muss, da sein Charakter nicht reagiert");
if (index != -1) {
setLine(index, "# Ob der Spieler bei großer Trunkenheit mehrmals probieren muss sich einzuloggen, da sein Charakter kurz nicht reagiert [true]");
}
index = indexOfStart("# Ob der Spieler sich übertrinken kann und dann in Ohnmacht fällt (gekickt wird)");
if (index != -1) {
setLine(index, "# Ob der Spieler kurz in Ohnmacht fällt (vom Server gekickt wird) wenn er die maximale Trunkenheit erreicht [false]");
}
index = indexOfStart("# Das Item kann nicht aufgesammelt werden und bleibt bis zum Despawnen liegen. (Achtung:");
if (index != -1) {
setLine(index, "# Das Item kann nicht aufgesammelt werden und bleibt bis zum Despawnen liegen.");
}
index = indexOfStart("# Färben der Iteminformationen je nach Qualität während sie sich 1. im Fass und/oder 2. im Braustand befinden [true, false]");
if (index != -1) {
setLine(index, "# Färben der Iteminformationen je nach Qualität während sie sich 1. im Fass und/oder 2. im Braustand befinden [true, true]");
}
index = indexOfStart("# Wenn ein Update gefunden wurde, wird dies bei Serverstart im log angezeigt, sowie ops benachrichtigt");
if (index != -1) {
setLine(index, "# Wenn ein Update gefunden wurde, wird dies bei Serverstart im log angezeigt, sowie OPs benachrichtigt");
}
index = indexOfStart("# Eine Liste von allen Materialien kann hier gefunden werden: http://jd.bukkit.org");
if (index != -1) {
setLine(index, "# Eine Liste von allen Materialien kann hier gefunden werden: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html");
}
String[] lines = new String[] { "# Wenn Vault installiert ist können normale englische Item Namen verwendet werden, anstatt Material, ID und Data!",
"# Vault erkennt Namen wie \"Jungle Leaves\" anstatt \"LEAVES,3\". Dies macht es viel einfacher!" };
index = indexOfStart("# Es kann ein Data-Wert angegeben werden, weglassen");
if (index != -1) {
setLine(index, "# Es kann ein Data-Wert (durability) angegeben werden, weglassen ignoriert diesen beim hinzufügen einer Zutat");
addLines(index + 1, lines);
} else {
index = indexOfStart("# Eine Liste von allen Materialien kann hier");
if (index == -1) {
index = indexOfStart("# cookingtime: ") - 1;
if (index == -2) {
index = indexOfStart("# ingredients: Auflistung von");
if (index == -1) {
index = indexOfStart("# -- Rezepte für Getränke --") + 1;
if (index == 0) {
index = indexOfStart("# -- Verschiedene Einstellungen --");
}
}
}
}
if (index == -1) {
appendLines(lines);
} else {
addLines(index + 1, lines);
}
}
lines = new String[] { "# Effekte sind ab der 1.9 immer verborgen, wegen Änderungen an den Tränken." };
index = indexOfStart("# Mögliche Effekte: http://jd.bukkit.org");
if (index != -1) {
setLine(index, "# Mögliche Effekte: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html");
addLines(index, lines);
} else {
index = indexOfStart("# Ein 'X' an den Namen anhängen, um");
if (index == -1) {
index = indexOfStart("# effects: ");
if (index == -1) {
index = indexOfStart("# -- Rezepte für Getränke --") + 1;
}
}
if (index == 0) {
appendLines(lines);
} else {
addLines(index + 1, lines);
}
}
index = indexOfStart("# Text, der zwischen diesen Buchstaben");
if (index != -1) {
setLine(index, "# Im Chat geschriebener Text, der zwischen diesen Buchstaben steht, wird nicht verändert (\",\" als Trennung verwenden) (Liste) [- '[,]']");
}
}
// Update en from 1.3.1 to 1.4
private void update131en() {
updateVersion("1.4");
int index = indexOfStart("# SamplePlugin = installed home plugin. Supports: ManagerXL.");
if (index != -1) {
config.remove(index);
}
index = indexOfStart("# If the player \"wakes up\" at a random place when offline for some time while drinking (the places have to be defined with '/br Wakeup add'");
if (index != -1) {
setLine(index, "# If the player \"wakes up\" at a random place when offline for some time while drinking (the places have to be defined with '/brew Wakeup add' through an admin)");
}
index = indexOfStart("# If the Player may get some logins denied, when his character is drunk");
if (index != -1) {
setLine(index, "# If the Player may have to try multiple times when logging in while extremely drunk [true]");
}
index = indexOfStart("# If the Player faints (gets kicked) for some minutes if he overdrinks");
if (index != -1) {
setLine(index, "# If the Player faints shortly (gets kicked from the server) if he drinks the max amount of alcohol possible [false]");
}
index = indexOfStart("# The item can not be collected and stays on the ground until it despawns. (Warning:");
if (index != -1) {
setLine(index, "# The item can not be collected and stays on the ground until it despawns.");
}
index = indexOfStart("# Color the Item information (lore) depending on quality while it is 1. in a barrel and/or 2. in a brewing stand [true, false]");
if (index != -1) {
setLine(index, "# Color the Item information (lore) depending on quality while it is 1. in a barrel and/or 2. in a brewing stand [true, true]");
}
index = indexOfStart("# If an Update is found a Message is logged on Server-start and displayed to ops joining the game");
if (index != -1) {
setLine(index, "# If an Update is found a Message is logged on Server-start and displayed to OPs joining the game");
}
index = indexOfStart("# A list of materials can be found here: http://jd.bukkit.org");
if (index != -1) {
setLine(index, "# A list of materials can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html");
}
String[] lines = new String[] { "# If Vault is installed normal names can be used instead of material or id, so using Vault is highly recommended.",
"# Vault will recognize things like \"Jungle Leaves\" instead of \"LEAVES,3\"" };
index = indexOfStart("# You can specify a data value, omitting");
if (index != -1) {
setLine(index, "# You can specify a data (durability) value, omitting it will ignore the data value of the added ingredient");
addLines(index + 1, lines);
} else {
index = indexOfStart("# A list of materials can be found");
if (index == -1) {
index = indexOfStart("# cookingtime: Time in real minutes") - 1;
if (index == -2) {
index = indexOfStart("# ingredients: ");
if (index == -1) {
index = indexOfStart("# -- Recipes for Potions --") + 1;
if (index == 0) {
index = indexOfStart("# -- Settings --");
}
}
}
}
if (index == -1) {
appendLines(lines);
} else {
addLines(index + 1, lines);
}
}
lines = new String[] { "# Effects are always hidden in 1.9 and newer, because of changes in the potion mechanics." };
index = indexOfStart("# Possible Effects: http://jd.bukkit.org");
if (index != -1) {
setLine(index, "# Possible Effects: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/potion/PotionEffectType.html");
addLines(index, lines);
} else {
index = indexOfStart("# Suffix name with");
if (index == -1) {
index = indexOfStart("# effects: ");
if (index == -1) {
index = indexOfStart("# -- Recipes for Potions --") + 1;
}
}
if (index == 0) {
appendLines(lines);
} else {
addLines(index + 1, lines);
}
}
index = indexOfStart("# Enclose a text with these Letters to bypass Chat Distortion");
if (index != -1) {
setLine(index, "# Enclose a Chat text with these Letters to bypass Chat Distortion (Use \",\" as Separator) (list) [- '[,]']");
}
}
}