Config Updater to update Material names

Updater will only update materials on 1.13
Updated configs as well
This commit is contained in:
Sn0wStorm 2018-10-30 14:23:01 +01:00
parent 124267898e
commit 086f5b5c9e
12 changed files with 328 additions and 167 deletions

View File

@ -65,14 +65,15 @@ updateCheck: true
autosave: 3 autosave: 3
# Config Version # Config Version
version: '1.6' version: '1.7'
oldMat: true
# -- Rezepte für Getränke -- # -- Rezepte für Getränke --
# name: Verschiedene Namen für schlecht/mittel/gut (Farbcodes möglich: z.b. &6) # name: Verschiedene Namen für schlecht/mittel/gut (Farbcodes möglich: z.b. &6)
# ingredients: Auflistung von 'Material oder ID,Data/Anzahl' # ingredients: Auflistung von 'Material,Data/Anzahl'
# (Item-ids anstatt Material werden von Bukkit nicht mehr unterstützt und funktionieren möglicherweise in Zukunft nicht mehr!) # (Item-ids anstatt Material können in Bukkit nicht mehr benutzt werden)
# Eine Liste von allen Materialien kann hier gefunden werden: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html # Eine Liste von allen Materialien kann hier gefunden werden: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# Es kann ein Data-Wert (durability) angegeben werden, weglassen ignoriert diesen beim hinzufügen einer Zutat # Es kann ein Data-Wert (durability) angegeben werden, weglassen ignoriert diesen beim hinzufügen einer Zutat
# Wenn Vault installiert ist können normale englische Item Namen verwendet werden, anstatt Material, ID und Data! # Wenn Vault installiert ist können normale englische Item Namen verwendet werden, anstatt Material, ID und Data!
@ -100,9 +101,9 @@ recipes:
name: Schlechtes Beispiel/Beispiel/Gutes Beispiel name: Schlechtes Beispiel/Beispiel/Gutes Beispiel
ingredients: ingredients:
- SUGAR_CANE/5 - SUGAR_CANE/5
- 264/1 - DIAMOND/1
- INK_SACK,3/20 - INK_SACK,3/20
- 5,1/8 - WOOD,1/8
- BEDROCK/1 - BEDROCK/1
# - Jungle Leaves/64 # Nur mit Vault # - Jungle Leaves/64 # Nur mit Vault
# - Green Dye/6 # Nur mit Vault # - Green Dye/6 # Nur mit Vault
@ -245,7 +246,7 @@ recipes:
# cooked: ALLE möglichen Zutaten und die nach dem Gähren daraus entstehenden Tranknamen: # cooked: ALLE möglichen Zutaten und die nach dem Gähren daraus entstehenden Tranknamen:
# [Beispiel] MATERIAL_oder_id: Name nach Gähren # [Beispiel] MATERIAL: Name nach Gähren
cooked: cooked:
WHEAT: Getreideferment WHEAT: Getreideferment

View File

@ -62,14 +62,15 @@ updateCheck: true
autosave: 3 autosave: 3
# Config Version # Config Version
version: '1.6' version: '1.7'
oldMat: true
# -- Recipes for Potions -- # -- Recipes for Potions --
# name: Different names for bad/normal/good (Formatting codes possible: such as &6) # name: Different names for bad/normal/good (Formatting codes possible: such as &6)
# ingredients: List of 'material or id,data/amount' # ingredients: List of 'material,data/amount'
# (Item-ids instead of material are deprecated by bukkit and may not work in the future!) # (Item-ids instead of material are not supported by bukkit anymore and will not work)
# A list of materials can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html # A list of materials can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# You can specify a data (durability) value, omitting it will ignore the data value of the added ingredient # You can specify a data (durability) value, omitting it will ignore the data value of the added ingredient
# If Vault is installed normal names can be used instead of material or id, so using Vault is highly recommended. # If Vault is installed normal names can be used instead of material or id, so using Vault is highly recommended.
@ -97,9 +98,9 @@ recipes:
name: Bad Example/Example/Good Example name: Bad Example/Example/Good Example
ingredients: ingredients:
- SUGAR_CANE/5 - SUGAR_CANE/5
- 264/1 - DIAMOND/1
- INK_SACK,3/20 - INK_SACK,3/20
- 5,1/8 - WOOD,1/8
- BEDROCK/1 - BEDROCK/1
# - Jungle Leaves/64 # Only with Vault # - Jungle Leaves/64 # Only with Vault
# - Green Dye/6 # Only with Vault # - Green Dye/6 # Only with Vault
@ -243,7 +244,7 @@ recipes:
# cooked: EVERY possible ingredient and the names for the originating potions after fermenting: # cooked: EVERY possible ingredient and the names for the originating potions after fermenting:
# [Example] MATERIAL_or_id: Name after cooking # [Example] MATERIAL: Name after cooking
cooked: cooked:
WHEAT: Fermented wheat WHEAT: Fermented wheat

View File

@ -62,13 +62,14 @@ updateCheck: true
autosave: 3 autosave: 3
# Version de configuration # Version de configuration
version: '1.6' version: '1.7'
oldMat: true
# -- Recette pour les boissons -- # -- Recette pour les boissons --
# name: Différents noms pour la mauvaise/moyen/bonne qualité (Les codes de mise en forme sont pris en charge: comme par exemple &6 pour la couleur Or.) # name: Différents noms pour la mauvaise/moyen/bonne qualité (Les codes de mise en forme sont pris en charge: comme par exemple &6 pour la couleur Or.)
# ingredients: Liste des 'matériaux ou id,data/montant' # ingredients: Liste des 'matériaux,data/montant'
# (Les id d'objets à la place des matériaux sont obsolètes pour bukkit et pourraient ne pas fonctionner dans le futur!) # (Les id d'objets à la place des matériaux sont obsolètes pour bukkit et pourraient ne pas fonctionner dans le futur!)
# Ex: 'SUGAR_CANE' # Ex: 'SUGAR_CANE'
# Une liste des matériaux peuvent-être trouvés ici: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html # Une liste des matériaux peuvent-être trouvés ici: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
@ -248,7 +249,7 @@ recipes:
# cooked: CHAQUE ingrédient possible avec le nom donné après la fermentation (la cuisson): # cooked: CHAQUE ingrédient possible avec le nom donné après la fermentation (la cuisson):
# [Exemple] MATERIEL_ou_id: Nom après la cuisson # [Exemple] MATERIEL: Nom après la cuisson
cooked: cooked:
WHEAT: Blé fermenté WHEAT: Blé fermenté

View File

@ -62,13 +62,14 @@ updateCheck: true
autosave: 3 autosave: 3
# Versione del config # Versione del config
version: '1.6' version: '1.7'
oldMat: true
# -- Ricette per pozioni -- # -- Ricette per pozioni --
# name: Tre nomi diversi per diverse qualità (cattivo/normale/buono). I codici come &6 possono essere usati. # name: Tre nomi diversi per diverse qualità (cattivo/normale/buono). I codici come &6 possono essere usati.
# ingredients: Lista degli ingredienti nel formato materiale o id,dati/quantità # ingredients: Lista degli ingredienti nel formato materiale,dati/quantità
# (Gli id invece dei materiali sono "disapprovati" da Bukkit e potrebbero non funzionare in futuro!) # (Gli id invece dei materiali sono "disapprovati" da Bukkit e potrebbero non funzionare in futuro!)
# Una lista di materiali può essere trovata qui: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html # Una lista di materiali può essere trovata qui: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# Puoi specificare dei dati dell'oggetto, ma se omesso sarà semplicemente ignorato. # Puoi specificare dei dati dell'oggetto, ma se omesso sarà semplicemente ignorato.
@ -243,7 +244,7 @@ recipes:
# cooked: OGNI possibile ingrediente e i nomi per la pozione originatasi dopo la fermentazione. # cooked: OGNI possibile ingrediente e i nomi per la pozione originatasi dopo la fermentazione.
# (Esempio) MATERIALE_o_id: Nome dopo la cottura # (Esempio) MATERIALE: Nome dopo la cottura
cooked: cooked:
WHEAT: Frumento fermentato WHEAT: Frumento fermentato

View File

@ -32,8 +32,8 @@ enableKickOnOverdrink: false
# Das Item kann nicht aufgesammelt werden und bleibt bis zum Despawnen liegen. # Das Item kann nicht aufgesammelt werden und bleibt bis zum Despawnen liegen.
enablePuke: true enablePuke: true
# Item das beim Erbrechen mehrfach unaufsammelbar fallen gelassen wird [SOUL_SAND] # Item das beim Erbrechen mehrfach unaufsammelbar fallen gelassen wird [Soul_Sand]
pukeItem: SOUL_SAND pukeItem: Soul_Sand
# Zeit in Sekunden bis die pukeitems despawnen, (mc standard wäre 300 = 5 min) [60] # Zeit in Sekunden bis die pukeitems despawnen, (mc standard wäre 300 = 5 min) [60]
# Wurde die item Despawnzeit in der spigot.yml verändert, verändert sich auch die pukeDespawnzeit in Abhängigkeit. # Wurde die item Despawnzeit in der spigot.yml verändert, verändert sich auch die pukeDespawnzeit in Abhängigkeit.
@ -41,8 +41,8 @@ pukeDespawntime: 60
# Konsumierbares Item/Stärke. Senkt den Alkoholpegel um <Stärke> wenn konsumiert. # Konsumierbares Item/Stärke. Senkt den Alkoholpegel um <Stärke> wenn konsumiert.
drainItems: drainItems:
- BREAD/4 - Bread/4
- MILK_BUCKET/2 - Milk_Bucket/2
# Zeit (in Tagen) die Trunkenheitsdaten nach offlinegehen eines Spielers im Speicher verbleiben, um z.B. Kater-Effekte anzuwenden. [7] # Zeit (in Tagen) die Trunkenheitsdaten nach offlinegehen eines Spielers im Speicher verbleiben, um z.B. Kater-Effekte anzuwenden. [7]
hangoverDays: 7 hangoverDays: 7
@ -65,14 +65,14 @@ updateCheck: true
autosave: 3 autosave: 3
# Config Version # Config Version
version: '1.6' version: '1.7'
# -- Rezepte für Getränke -- # -- Rezepte für Getränke --
# name: Verschiedene Namen für schlecht/mittel/gut (Farbcodes möglich: z.b. &6) # name: Verschiedene Namen für schlecht/mittel/gut (Farbcodes möglich: z.b. &6)
# ingredients: Auflistung von 'Material oder ID,Data/Anzahl' # ingredients: Auflistung von 'Material,Data/Anzahl'
# (Item-ids anstatt Material werden von Bukkit nicht mehr unterstützt und funktionieren möglicherweise in Zukunft nicht mehr!) # (Item-ids anstatt Material können in Bukkit nicht mehr benutzt werden)
# Eine Liste von allen Materialien kann hier gefunden werden: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html # Eine Liste von allen Materialien kann hier gefunden werden: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# Es kann ein Data-Wert (durability) angegeben werden, weglassen ignoriert diesen beim hinzufügen einer Zutat # Es kann ein Data-Wert (durability) angegeben werden, weglassen ignoriert diesen beim hinzufügen einer Zutat
# Wenn Vault installiert ist können normale englische Item Namen verwendet werden, anstatt Material, ID und Data! # Wenn Vault installiert ist können normale englische Item Namen verwendet werden, anstatt Material, ID und Data!
@ -99,11 +99,11 @@ recipes:
0: 0:
name: Schlechtes Beispiel/Beispiel/Gutes Beispiel name: Schlechtes Beispiel/Beispiel/Gutes Beispiel
ingredients: ingredients:
- SUGAR_CANE/5 - Sugar_Cane/5
- diamond/1 - Diamond/1
- Cocoa_Beans/20 - Cocoa_Beans/20
- spruce_planks/8 - Spruce_Planks/8
- BEDROCK/1 - Bedrock/1
# - Jungle Leaves/64 # Nur mit Vault # - Jungle Leaves/64 # Nur mit Vault
# - Green Dye/6 # Nur mit Vault # - Green Dye/6 # Nur mit Vault
cookingtime: 3 cookingtime: 3
@ -122,7 +122,7 @@ recipes:
1: 1:
name: Ranziges Weißbier/Weißbier/Feines Weißbier name: Ranziges Weißbier/Weißbier/Feines Weißbier
ingredients: ingredients:
- WHEAT/3 - Wheat/3
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 1 wood: 1
@ -133,7 +133,7 @@ recipes:
2: 2:
name: Ranziges Bier/Bier/Feines Bier name: Ranziges Bier/Bier/Feines Bier
ingredients: ingredients:
- WHEAT/6 - Wheat/6
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 0 wood: 0
@ -144,7 +144,7 @@ recipes:
3: 3:
name: Ranziges Dunkelbier/Dunkelbier/Feines Dunkelbier name: Ranziges Dunkelbier/Dunkelbier/Feines Dunkelbier
ingredients: ingredients:
- WHEAT/6 - Wheat/6
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 4 wood: 4
@ -155,7 +155,7 @@ recipes:
4: 4:
name: Scheußlicher Met/Met/&6Goldener Met name: Scheußlicher Met/Met/&6Goldener Met
ingredients: ingredients:
- SUGAR_CANE/6 - Sugar_Cane/6
cookingtime: 3 cookingtime: 3
distillruns: 0 distillruns: 0
wood: 2 wood: 2
@ -166,8 +166,8 @@ recipes:
5: 5:
name: Apfelmet/Süßer Apfelmet/&6Goldensüßer Apfelmet name: Apfelmet/Süßer Apfelmet/&6Goldensüßer Apfelmet
ingredients: ingredients:
- SUGAR_CANE/6 - Sugar_Cane/6
- APPLE/2 - Apple/2
cookingtime: 4 cookingtime: 4
distillruns: 0 distillruns: 0
wood: 2 wood: 2
@ -180,7 +180,7 @@ recipes:
6: 6:
name: Bitterer Rum/Würziger Rum/&6Goldener Rum name: Bitterer Rum/Würziger Rum/&6Goldener Rum
ingredients: ingredients:
- SUGAR_CANE/14 - Sugar_Cane/14
cookingtime: 5 cookingtime: 5
distillruns: 2 distillruns: 2
distilltime: 30 distilltime: 30
@ -195,7 +195,7 @@ recipes:
7: 7:
name: Abgeranzter Vodka/Vodka/Russischer Vodka name: Abgeranzter Vodka/Vodka/Russischer Vodka
ingredients: ingredients:
- POTATO/10 - Potato/10
cookingtime: 15 cookingtime: 15
distillruns: 3 distillruns: 3
age: 0 age: 0
@ -208,7 +208,7 @@ recipes:
8: 8:
name: minderwertiger Absinth/Absinth/Starker Absinth name: minderwertiger Absinth/Absinth/Starker Absinth
ingredients: ingredients:
- GRASS/15 - Grass/15
cookingtime: 3 cookingtime: 3
distillruns: 6 distillruns: 6
distilltime: 80 distilltime: 80
@ -220,8 +220,8 @@ recipes:
9: 9:
name: Kartoffelsuppe name: Kartoffelsuppe
ingredients: ingredients:
- POTATO_ITEM/5 - Potato/5
- LONG_GRASS/3 - Grass/3
cookingtime: 3 cookingtime: 3
color: PINK color: PINK
difficulty: 1 difficulty: 1
@ -230,8 +230,8 @@ recipes:
10: 10:
name: Fader Kaffee/Kaffee/Starker Kaffee name: Fader Kaffee/Kaffee/Starker Kaffee
ingredients: ingredients:
- INK_SACK,3/12 - Ink_Sac,3/12
- MILK_BUCKET/2 - Milk_Bucket/2
cookingtime: 2 cookingtime: 2
color: BLACK color: BLACK
difficulty: 3 difficulty: 3
@ -245,17 +245,17 @@ recipes:
# cooked: ALLE möglichen Zutaten und die nach dem Gähren daraus entstehenden Tranknamen: # cooked: ALLE möglichen Zutaten und die nach dem Gähren daraus entstehenden Tranknamen:
# [Beispiel] MATERIAL_oder_id: Name nach Gähren # [Beispiel] MATERIAL: Name nach Gähren
cooked: cooked:
WHEAT: Getreideferment Wheat: Getreideferment
SUGAR_CANE: Zuckersud Sugar_Cane: Zuckersud
APPLE: Apfelmost Apple: Apfelmost
POTATO: Kartoffelmaische Potato: Kartoffelmaische
GRASS: Kräuterbrühe Grass: Kräuterbrühe
RED_MUSHROOM: Pilzsud Red_Mushroom: Pilzsud
Cocoa_Beans: Farbige Brühe Cocoa_Beans: Farbige Brühe
MILK_BUCKET: Milchiges Wasser Milk_Bucket: Milchiges Wasser

View File

@ -32,8 +32,8 @@ enableKickOnOverdrink: false
# The item can not be collected and stays on the ground until it despawns. # The item can not be collected and stays on the ground until it despawns.
enablePuke: true enablePuke: true
# Item that is dropped multiple times uncollectable when puking [SOUL_SAND] # Item that is dropped multiple times uncollectable when puking [Soul_Sand]
pukeItem: SOUL_SAND pukeItem: Soul_Sand
# Time in seconds until the pukeitems despawn, (mc default is 300 = 5 min) [60] # Time in seconds until the pukeitems despawn, (mc default is 300 = 5 min) [60]
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well. # If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
@ -41,8 +41,8 @@ pukeDespawntime: 60
# Consumable Item/strength. Decreases the alcohol level by <strength> when consumed. (list) # Consumable Item/strength. Decreases the alcohol level by <strength> when consumed. (list)
drainItems: drainItems:
- BREAD/4 - Bread/4
- MILK_BUCKET/2 - Milk_Bucket/2
# Time (in days) that drunkeness-data stays in memory after a player goes offline, to apply hangover etc. [7] # Time (in days) that drunkeness-data stays in memory after a player goes offline, to apply hangover etc. [7]
hangoverDays: 7 hangoverDays: 7
@ -62,14 +62,14 @@ updateCheck: true
autosave: 3 autosave: 3
# Config Version # Config Version
version: '1.6' version: '1.7'
# -- Recipes for Potions -- # -- Recipes for Potions --
# name: Different names for bad/normal/good (Formatting codes possible: such as &6) # name: Different names for bad/normal/good (Formatting codes possible: such as &6)
# ingredients: List of 'material or id,data/amount' # ingredients: List of 'material,data/amount'
# (Item-ids instead of material are deprecated by bukkit and may not work in the future!) # (Item-ids instead of material are not supported by bukkit anymore and will not work)
# A list of materials can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html # A list of materials can be found here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# You can specify a data (durability) value, omitting it will ignore the data value of the added ingredient # You can specify a data (durability) value, omitting it will ignore the data value of the added ingredient
# If Vault is installed normal names can be used instead of material or id, so using Vault is highly recommended. # If Vault is installed normal names can be used instead of material or id, so using Vault is highly recommended.
@ -96,11 +96,11 @@ recipes:
0: 0:
name: Bad Example/Example/Good Example name: Bad Example/Example/Good Example
ingredients: ingredients:
- SUGAR_CANE/5 - Sugar_Cane/5
- diamond/1 - Diamond/1
- Cocoa_Beans/20 - Cocoa_Beans/20
- spruce_planks/8 - Spruce_Planks/8
- BEDROCK/1 - Bedrock/1
# - Jungle Leaves/64 # Only with Vault # - Jungle Leaves/64 # Only with Vault
# - Green Dye/6 # Only with Vault # - Green Dye/6 # Only with Vault
cookingtime: 3 cookingtime: 3
@ -119,7 +119,7 @@ recipes:
1: 1:
name: Skunky Wheatbeer/Wheatbeer/Fine Wheatbeer name: Skunky Wheatbeer/Wheatbeer/Fine Wheatbeer
ingredients: ingredients:
- WHEAT/3 - Wheat/3
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 1 wood: 1
@ -130,7 +130,7 @@ recipes:
2: 2:
name: Skunky Beer/Beer/Fine Beer name: Skunky Beer/Beer/Fine Beer
ingredients: ingredients:
- WHEAT/6 - Wheat/6
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 0 wood: 0
@ -141,7 +141,7 @@ recipes:
3: 3:
name: Skunky Darkbeer/Darkbeer/Fine Darkbeer name: Skunky Darkbeer/Darkbeer/Fine Darkbeer
ingredients: ingredients:
- WHEAT/6 - Wheat/6
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 4 wood: 4
@ -152,7 +152,7 @@ recipes:
4: 4:
name: Awkward Mead/Mead/&6Golden Mead name: Awkward Mead/Mead/&6Golden Mead
ingredients: ingredients:
- SUGAR_CANE/6 - Sugar_Cane/6
cookingtime: 3 cookingtime: 3
distillruns: 0 distillruns: 0
wood: 2 wood: 2
@ -163,8 +163,8 @@ recipes:
5: 5:
name: Apple Mead/Sweet Apple Mead/&6Sweet Golden Apple Mead name: Apple Mead/Sweet Apple Mead/&6Sweet Golden Apple Mead
ingredients: ingredients:
- SUGAR_CANE/6 - Sugar_Cane/6
- APPLE/2 - Apple/2
cookingtime: 4 cookingtime: 4
distillruns: 0 distillruns: 0
wood: 2 wood: 2
@ -177,7 +177,7 @@ recipes:
6: 6:
name: Bitter Rum/Spicy Rum/&6Golden Rum name: Bitter Rum/Spicy Rum/&6Golden Rum
ingredients: ingredients:
- SUGAR_CANE/14 - Sugar_Cane/14
cookingtime: 5 cookingtime: 5
distillruns: 2 distillruns: 2
distilltime: 30 distilltime: 30
@ -192,7 +192,7 @@ recipes:
7: 7:
name: Lousy Vodka/Vodka/Russian Vodka name: Lousy Vodka/Vodka/Russian Vodka
ingredients: ingredients:
- POTATO/10 - Potato/10
cookingtime: 15 cookingtime: 15
distillruns: 3 distillruns: 3
age: 0 age: 0
@ -205,7 +205,7 @@ recipes:
8: 8:
name: Poor Absinthe/Absinthe/Strong Absinthe name: Poor Absinthe/Absinthe/Strong Absinthe
ingredients: ingredients:
- GRASS/15 - Grass/15
cookingtime: 3 cookingtime: 3
distillruns: 6 distillruns: 6
distilltime: 80 distilltime: 80
@ -217,8 +217,8 @@ recipes:
9: 9:
name: Potato soup name: Potato soup
ingredients: ingredients:
- POTATO/5 - Potato/5
- GRASS/3 - Grass/3
cookingtime: 3 cookingtime: 3
color: PINK color: PINK
difficulty: 1 difficulty: 1
@ -228,7 +228,7 @@ recipes:
name: Stale Coffee/Coffee/Strong Coffee name: Stale Coffee/Coffee/Strong Coffee
ingredients: ingredients:
- Cocoa_Beans/12 - Cocoa_Beans/12
- MILK_BUCKET/2 - Milk_Bucket/2
cookingtime: 2 cookingtime: 2
color: BLACK color: BLACK
difficulty: 3 difficulty: 3
@ -243,17 +243,17 @@ recipes:
# cooked: EVERY possible ingredient and the names for the originating potions after fermenting: # cooked: EVERY possible ingredient and the names for the originating potions after fermenting:
# [Example] MATERIAL_or_id: Name after cooking # [Example] MATERIAL: Name after cooking
cooked: cooked:
WHEAT: Fermented wheat Wheat: Fermented wheat
SUGAR_CANE: Sugar brew Sugar_Cane: Sugar brew
APPLE: Apple cider Apple: Apple cider
POTATO: Potatomash Potato: Potatomash
GRASS: Boiled herbs Grass: Boiled herbs
RED_MUSHROOM: Mushroom brew Red_Mushroom: Mushroom brew
Cocoa_Beans: Colored brew Cocoa_Beans: Colored brew
MILK_BUCKET: Milky water Milk_Bucket: Milky water

View File

@ -32,8 +32,8 @@ enableKickOnOverdrink: false
# L'objet ne peut pas être collecté et reste sur le sol jusqu'à ce qu'il disparaisse # L'objet ne peut pas être collecté et reste sur le sol jusqu'à ce qu'il disparaisse
enablePuke: true enablePuke: true
# L'objet utilisé pour représenter le vomit [SOUL_SAND] # L'objet utilisé pour représenter le vomit [Soul_Sand]
pukeItem: SOUL_SAND pukeItem: Soul_Sand
# Time in seconds until the pukeitems despawn, (mc default is 300 = 5 min) [60] # Time in seconds until the pukeitems despawn, (mc default is 300 = 5 min) [60]
# If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well. # If the item despawn time was changed in the spigot.yml, the pukeDespawntime changes as well.
@ -41,8 +41,8 @@ pukeDespawntime: 60
# Consommables Objet/Force. Réduit le montant d'alcool par <Force> lors de la consommation. (list) # Consommables Objet/Force. Réduit le montant d'alcool par <Force> lors de la consommation. (list)
drainItems: drainItems:
- BREAD/4 - Bread/4
- MILK_BUCKET/2 - Milk_Bucket/2
# Temps (en jours) pour que les données d'ivresse restent sauvergardées lorsque le joueur est déconnecté, pour appliquer les effets. [7] # Temps (en jours) pour que les données d'ivresse restent sauvergardées lorsque le joueur est déconnecté, pour appliquer les effets. [7]
hangoverDays: 7 hangoverDays: 7
@ -62,15 +62,15 @@ updateCheck: true
autosave: 3 autosave: 3
# Version de configuration # Version de configuration
version: '1.6' version: '1.7'
# -- Recette pour les boissons -- # -- Recette pour les boissons --
# name: Différents noms pour la mauvaise/moyen/bonne qualité (Les codes de mise en forme sont pris en charge: comme par exemple &6 pour la couleur Or.) # name: Différents noms pour la mauvaise/moyen/bonne qualité (Les codes de mise en forme sont pris en charge: comme par exemple &6 pour la couleur Or.)
# ingredients: Liste des 'matériaux ou id,data/montant' # ingredients: Liste des 'matériaux,data/montant'
# (Les id d'objets à la place des matériaux sont obsolètes pour bukkit et pourraient ne pas fonctionner dans le futur!) # (Les id d'objets à la place des matériaux sont obsolètes pour bukkit)
# Ex: 'SUGAR_CANE' # Ex: 'Sugar_Cane'
# Une liste des matériaux peuvent-être trouvés ici: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html # Une liste des matériaux peuvent-être trouvés ici: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# Vous pouvez spécifier une data (Ex: 5,3 -> Planche de bois de jungle), si vous ne le faites pas la data ne sera pas prise en compte (Ex : 5 -> Bois en général) # Vous pouvez spécifier une data (Ex: 5,3 -> Planche de bois de jungle), si vous ne le faites pas la data ne sera pas prise en compte (Ex : 5 -> Bois en général)
# If Vault is installed normal names can be used instead of material or id, so using Vault is highly recommended. # If Vault is installed normal names can be used instead of material or id, so using Vault is highly recommended.
@ -101,11 +101,11 @@ recipes:
0: 0:
name: Mauvais Exemple/Exemple/Bonne Exemple name: Mauvais Exemple/Exemple/Bonne Exemple
ingredients: ingredients:
- SUGAR_CANE/5 - Sugar_Cane/5
- diamond/1 - Diamond/1
- Cocoa_Beans/20 - Cocoa_Beans/20
- spruce_planks/8 - Spruce_Planks/8
- BEDROCK/1 - Bedrock/1
# - Jungle Leaves/64 # Only with Vault # - Jungle Leaves/64 # Only with Vault
# - Green Dye/6 # Only with Vault # - Green Dye/6 # Only with Vault
cookingtime: 3 cookingtime: 3
@ -124,7 +124,7 @@ recipes:
1: 1:
name: Bière Blanche Fade/Bière Blanche/Bonne Bière Blanche name: Bière Blanche Fade/Bière Blanche/Bonne Bière Blanche
ingredients: ingredients:
- WHEAT/3 - Wheat/3
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 1 wood: 1
@ -135,7 +135,7 @@ recipes:
2: 2:
name: Bière Fade/Bière/Bonne Bière name: Bière Fade/Bière/Bonne Bière
ingredients: ingredients:
- WHEAT/6 - Wheat/6
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 0 wood: 0
@ -146,7 +146,7 @@ recipes:
3: 3:
name: Bière Brune Fade/Bière Brune/Bonne Bière Brune name: Bière Brune Fade/Bière Brune/Bonne Bière Brune
ingredients: ingredients:
- WHEAT/6 - Wheat/6
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 4 wood: 4
@ -157,7 +157,7 @@ recipes:
4: 4:
name: Hydromel Bizarre/Hydromel/&6Hydromel Doré name: Hydromel Bizarre/Hydromel/&6Hydromel Doré
ingredients: ingredients:
- SUGAR_CANE/6 - Sugar_Cane/6
cookingtime: 3 cookingtime: 3
distillruns: 0 distillruns: 0
wood: 2 wood: 2
@ -168,8 +168,8 @@ recipes:
5: 5:
name: Hydromel de Pommes/Doux Hydromel de Pommes/&6Doux Hydromel de Pommes Dorées name: Hydromel de Pommes/Doux Hydromel de Pommes/&6Doux Hydromel de Pommes Dorées
ingredients: ingredients:
- SUGAR_CANE/6 - Sugar_Cane/6
- APPLE/2 - Apple/2
cookingtime: 4 cookingtime: 4
distillruns: 0 distillruns: 0
wood: 2 wood: 2
@ -182,7 +182,7 @@ recipes:
6: 6:
name: Rhum Amer/Rhum Epicé/&6Rhum Doré name: Rhum Amer/Rhum Epicé/&6Rhum Doré
ingredients: ingredients:
- SUGAR_CANE/14 - Sugar_Cane/14
cookingtime: 5 cookingtime: 5
distillruns: 2 distillruns: 2
distilltime: 30 distilltime: 30
@ -197,7 +197,7 @@ recipes:
7: 7:
name: Vodka Sale/Vodka/Vodka Russe name: Vodka Sale/Vodka/Vodka Russe
ingredients: ingredients:
- POTATO/10 - Potato/10
cookingtime: 15 cookingtime: 15
distillruns: 3 distillruns: 3
age: 0 age: 0
@ -210,7 +210,7 @@ recipes:
8: 8:
name: Absinthe pauvre/Absinthe/Absinthe forte name: Absinthe pauvre/Absinthe/Absinthe forte
ingredients: ingredients:
- GRASS/15 - Grass/15
cookingtime: 3 cookingtime: 3
distillruns: 6 distillruns: 6
distilltime: 80 distilltime: 80
@ -222,8 +222,8 @@ recipes:
9: 9:
name: Potato soup name: Potato soup
ingredients: ingredients:
- POTATO/5 - Potato/5
- GRASS/3 - Grass/3
cookingtime: 3 cookingtime: 3
color: PINK color: PINK
difficulty: 1 difficulty: 1
@ -233,7 +233,7 @@ recipes:
name: Café fétide/Café/Café fort name: Café fétide/Café/Café fort
ingredients: ingredients:
- Cocoa_Beans/12 - Cocoa_Beans/12
- MILK_BUCKET/2 - Milk_Bucket/2
cookingtime: 2 cookingtime: 2
color: BLACK color: BLACK
difficulty: 3 difficulty: 3
@ -248,17 +248,17 @@ recipes:
# cooked: CHAQUE ingrédient possible avec le nom donné après la fermentation (la cuisson): # cooked: CHAQUE ingrédient possible avec le nom donné après la fermentation (la cuisson):
# [Exemple] MATERIEL_ou_id: Nom après la cuisson # [Exemple] MATERIEL: Nom après la cuisson
cooked: cooked:
WHEAT: Blé fermenté Wheat: Blé fermenté
SUGAR_CANE: Sucre fermenté Sugar_Cane: Sucre fermenté
APPLE: Cidre de pommes Apple: Cidre de pommes
POTATO: Purée de Pommes de Terre Potato: Purée de Pommes de Terre
GRASS: Herbes bouillies Grass: Herbes bouillies
RED_MUSHROOM: Champignons fermentés Red_Mushroom: Champignons fermentés
Cocoa_Beans: Fermentation colorée Cocoa_Beans: Fermentation colorée
MILK_BUCKET: Eau laiteuse Milk_Bucket: Eau laiteuse

View File

@ -32,8 +32,8 @@ enableKickOnOverdrink: false
# L'oggetto non può essere raccolto e resta per terra finché non sparisce. # L'oggetto non può essere raccolto e resta per terra finché non sparisce.
enablePuke: true enablePuke: true
# L'oggetto droppato in massa quando si vomita che dovrebbe rappresentare il vomito [SOUL_SAND] # L'oggetto droppato in massa quando si vomita che dovrebbe rappresentare il vomito [Soul_Sand]
pukeItem: SOUL_SAND pukeItem: Soul_Sand
# Tempo in secondi perché il vomito sparisca (il valore di minecraft di default è 300 = 5 min) [60] # Tempo in secondi perché il vomito sparisca (il valore di minecraft di default è 300 = 5 min) [60]
# Se il tempo di scomparsa viene cambiato in spigot.yml anche pukeDespawntime cambia. # Se il tempo di scomparsa viene cambiato in spigot.yml anche pukeDespawntime cambia.
@ -41,8 +41,8 @@ pukeDespawntime: 60
# Oggetto consumabile/forza. Questi oggetti se consumati calano il livello di alcool (della "forza" che avevi impsotato) (list) # Oggetto consumabile/forza. Questi oggetti se consumati calano il livello di alcool (della "forza" che avevi impsotato) (list)
drainItems: drainItems:
- BREAD/4 - Bread/4
- MILK_BUCKET/2 - Milk_Bucket/2
# Tempo in giorni che la sbronza resta in memoria dopo che il giocatore va offline, cioè il tempo per cui i postumi della sbornia durano. [7] # Tempo in giorni che la sbronza resta in memoria dopo che il giocatore va offline, cioè il tempo per cui i postumi della sbornia durano. [7]
hangoverDays: 7 hangoverDays: 7
@ -62,14 +62,14 @@ updateCheck: true
autosave: 3 autosave: 3
# Versione del config # Versione del config
version: '1.6' version: '1.7'
# -- Ricette per pozioni -- # -- Ricette per pozioni --
# name: Tre nomi diversi per diverse qualità (cattivo/normale/buono). I codici come &6 possono essere usati. # name: Tre nomi diversi per diverse qualità (cattivo/normale/buono). I codici come &6 possono essere usati.
# ingredients: Lista degli ingredienti nel formato materiale o id,dati/quantità # ingredients: Lista degli ingredienti nel formato materiale,dati/quantità
# (Gli id invece dei materiali sono "disapprovati" da Bukkit e potrebbero non funzionare in futuro!) # (Gli id invece dei materiali sono "disapprovati" da Bukkit)
# Una lista di materiali può essere trovata qui: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html # Una lista di materiali può essere trovata qui: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# Puoi specificare dei dati dell'oggetto, ma se omesso sarà semplicemente ignorato. # Puoi specificare dei dati dell'oggetto, ma se omesso sarà semplicemente ignorato.
# Se Vault è installato i nomi normali possono essere usati invece del materiale o dell'id quindi l'uso di Vault è fortemente consigliato. # Se Vault è installato i nomi normali possono essere usati invece del materiale o dell'id quindi l'uso di Vault è fortemente consigliato.
@ -96,11 +96,11 @@ recipes:
0: 0:
name: Cattivo esempio/Esempio/Buon esempio name: Cattivo esempio/Esempio/Buon esempio
ingredients: ingredients:
- SUGAR_CANE/5 - Sugar_Cane/5
- diamond/1 - Diamond/1
- Cocoa_Beans/20 - Cocoa_Beans/20
- spruce_planks/8 - Spruce_Planks/8
- BEDROCK/1 - Bedrock/1
# - Jungle Leaves/64 # Solo con Vault # - Jungle Leaves/64 # Solo con Vault
# - Green Dye/6 # Solo con Vault # - Green Dye/6 # Solo con Vault
cookingtime: 3 cookingtime: 3
@ -119,7 +119,7 @@ recipes:
1: 1:
name: Birra di frumento puzzolente/Birra di frumento/Birra di frumento pregiata name: Birra di frumento puzzolente/Birra di frumento/Birra di frumento pregiata
ingredients: ingredients:
- WHEAT/3 - Wheat/3
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 1 wood: 1
@ -130,7 +130,7 @@ recipes:
2: 2:
name: Birra puzzolente/Birra/Birra pregiata name: Birra puzzolente/Birra/Birra pregiata
ingredients: ingredients:
- WHEAT/6 - Wheat/6
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 0 wood: 0
@ -141,7 +141,7 @@ recipes:
3: 3:
name: Birra scura puzzolente/Birra scura/Birra scura pregiata name: Birra scura puzzolente/Birra scura/Birra scura pregiata
ingredients: ingredients:
- WHEAT/6 - Wheat/6
cookingtime: 8 cookingtime: 8
distillruns: 0 distillruns: 0
wood: 4 wood: 4
@ -152,7 +152,7 @@ recipes:
4: 4:
name: Idromele scarso/Idromele/&6Idromele dorato name: Idromele scarso/Idromele/&6Idromele dorato
ingredients: ingredients:
- SUGAR_CANE/6 - Sugar_Cane/6
cookingtime: 3 cookingtime: 3
distillruns: 0 distillruns: 0
wood: 2 wood: 2
@ -163,8 +163,8 @@ recipes:
5: 5:
name: Idromele di mele/Idromele di mele dolci/&6Idromele di mele dolci dorato name: Idromele di mele/Idromele di mele dolci/&6Idromele di mele dolci dorato
ingredients: ingredients:
- SUGAR_CANE/6 - Sugar_Cane/6
- APPLE/2 - Apple/2
cookingtime: 4 cookingtime: 4
distillruns: 0 distillruns: 0
wood: 2 wood: 2
@ -177,7 +177,7 @@ recipes:
6: 6:
name: Rum amaro/Rum speziato/&6Rum dorato name: Rum amaro/Rum speziato/&6Rum dorato
ingredients: ingredients:
- SUGAR_CANE/14 - Sugar_Cane/14
cookingtime: 5 cookingtime: 5
distillruns: 2 distillruns: 2
distilltime: 30 distilltime: 30
@ -192,7 +192,7 @@ recipes:
7: 7:
name: Vodka schifosa/Vodka/Vodka russa name: Vodka schifosa/Vodka/Vodka russa
ingredients: ingredients:
- POTATO/10 - Potato/10
cookingtime: 15 cookingtime: 15
distillruns: 3 distillruns: 3
age: 0 age: 0
@ -205,7 +205,7 @@ recipes:
8: 8:
name: Assenzio scarso/Assenzio/Assenzio forte name: Assenzio scarso/Assenzio/Assenzio forte
ingredients: ingredients:
- GRASS/15 - Grass/15
cookingtime: 3 cookingtime: 3
distillruns: 6 distillruns: 6
distilltime: 80 distilltime: 80
@ -217,8 +217,8 @@ recipes:
9: 9:
name: Zuppa di patate name: Zuppa di patate
ingredients: ingredients:
- POTATO/5 - Potato/5
- GRASS/3 - Grass/3
cookingtime: 3 cookingtime: 3
color: PINK color: PINK
difficulty: 1 difficulty: 1
@ -228,7 +228,7 @@ recipes:
name: Caffè stantio/Caffè/Caffè forte name: Caffè stantio/Caffè/Caffè forte
ingredients: ingredients:
- Cocoa_Beans,3/12 - Cocoa_Beans,3/12
- MILK_BUCKET/2 - Milk_Bucket/2
cookingtime: 2 cookingtime: 2
color: BLACK color: BLACK
difficulty: 3 difficulty: 3
@ -243,17 +243,17 @@ recipes:
# cooked: OGNI possibile ingrediente e i nomi per la pozione originatasi dopo la fermentazione. # cooked: OGNI possibile ingrediente e i nomi per la pozione originatasi dopo la fermentazione.
# (Esempio) MATERIALE_o_id: Nome dopo la cottura # (Esempio) MATERIALE: Nome dopo la cottura
cooked: cooked:
WHEAT: Frumento fermentato Wheat: Frumento fermentato
SUGAR_CANE: Miscela zuccherata Sugar_Cane: Miscela zuccherata
APPLE: Sidro di mele Apple: Sidro di mele
POTATO: Purè di patate Potato: Purè di patate
GRASS: Erbe bollite Grass: Erbe bollite
RED_MUSHROOM: Miscela ai funghi Red_Mushroom: Miscela ai funghi
Cocoa_Beans: Miscela colorata Cocoa_Beans: Miscela colorata
MILK_BUCKET: Acqua lattea Milk_Bucket: Acqua lattea

View File

@ -289,13 +289,9 @@ public class Barrel implements InventoryHolder {
public boolean hasBlock(Block block) { public boolean hasBlock(Block block) {
if (block != null) { if (block != null) {
if (LegacyUtil.isWoodPlanks(block.getType())) { if (LegacyUtil.isWoodPlanks(block.getType())) {
if (hasWoodBlock(block)) { return hasWoodBlock(block);
return true;
}
} else if (LegacyUtil.isWoodStairs(block.getType())) { } else if (LegacyUtil.isWoodStairs(block.getType())) {
if (hasStairsBlock(block)) { return hasStairsBlock(block);
return true;
}
} }
} }
return false; return false;
@ -748,7 +744,7 @@ public class Barrel implements InventoryHolder {
x = startX; x = startX;
y++; y++;
} }
stairsloc = ArrayUtils.toPrimitive(stairs.toArray(new Integer[stairs.size()])); stairsloc = ArrayUtils.toPrimitive(stairs.toArray(new Integer[0]));
return null; return null;
} }
@ -839,8 +835,8 @@ public class Barrel implements InventoryHolder {
x = startX; x = startX;
y++; y++;
} }
stairsloc = ArrayUtils.toPrimitive(stairs.toArray(new Integer[stairs.size()])); stairsloc = ArrayUtils.toPrimitive(stairs.toArray(new Integer[0]));
woodsloc = ArrayUtils.toPrimitive(woods.toArray(new Integer[woods.size()])); woodsloc = ArrayUtils.toPrimitive(woods.toArray(new Integer[0]));
return null; return null;
} }

View File

@ -38,7 +38,7 @@ import org.bukkit.plugin.java.JavaPlugin;
public class P extends JavaPlugin { public class P extends JavaPlugin {
public static P p; public static P p;
public static final String configVersion = "1.6"; public static final String configVersion = "1.7";
public static boolean debug; public static boolean debug;
public static boolean useUUID; public static boolean useUUID;
public static boolean use1_9; public static boolean use1_9;
@ -249,12 +249,15 @@ public class P extends JavaPlugin {
// Load LanguageReader // Load LanguageReader
languageReader = new LanguageReader(new File(p.getDataFolder(), "languages/" + language + ".yml")); languageReader = new LanguageReader(new File(p.getDataFolder(), "languages/" + language + ".yml"));
// Has to config still got old materials
boolean oldMat = config.getBoolean("oldMat", false);
// Check if config is the newest version // Check if config is the newest version
String version = config.getString("version", null); String version = config.getString("version", null);
if (version != null) { if (version != null) {
if (!version.equals(configVersion)) { if (!version.equals(configVersion) || (oldMat && use1_13)) {
copyDefaultConfigs(true); copyDefaultConfigs(true);
new ConfigUpdater(file).update(version, language); new ConfigUpdater(file).update(version, oldMat, language);
P.p.log("Config Updated to version: " + configVersion); P.p.log("Config Updated to version: " + configVersion);
config = YamlConfiguration.loadConfiguration(file); config = YamlConfiguration.loadConfiguration(file);
} }
@ -707,7 +710,7 @@ public class P extends JavaPlugin {
BCauldron.remove(block); BCauldron.remove(block);
return true; return true;
} else if (LegacyUtil.isFence(type)) { } else if (LegacyUtil.isFence(type)) {
// remove barrel and throw potions on the ground // remove barrel and throw potions on the ground
Barrel barrel = Barrel.getBySpigot(block); Barrel barrel = Barrel.getBySpigot(block);
if (barrel != null) { if (barrel != null) {
@ -720,7 +723,7 @@ public class P extends JavaPlugin {
} }
return true; return true;
} else if (LegacyUtil.isSign(type)) { } else if (LegacyUtil.isSign(type)) {
// remove small Barrels // remove small Barrels
Barrel barrel2 = Barrel.getBySpigot(block); Barrel barrel2 = Barrel.getBySpigot(block);
if (barrel2 != null) { if (barrel2 != null) {
@ -737,7 +740,7 @@ public class P extends JavaPlugin {
} }
return true; return true;
} else if (LegacyUtil.isWoodPlanks(type) || LegacyUtil.isWoodStairs(type)){ } else if (LegacyUtil.isWoodPlanks(type) || LegacyUtil.isWoodStairs(type)){
Barrel barrel3 = Barrel.getByWood(block); Barrel barrel3 = Barrel.getByWood(block);
if (barrel3 != null) { if (barrel3 != null) {
if (barrel3.hasPermsDestroy(player)) { if (barrel3.hasPermsDestroy(player)) {
@ -746,7 +749,7 @@ public class P extends JavaPlugin {
return false; return false;
} }
} }
} }
return true; return true;
} }

View File

@ -1,5 +1,9 @@
package com.dre.brewery.filedata; package com.dre.brewery.filedata;
import com.dre.brewery.LegacyUtil;
import com.dre.brewery.P;
import org.bukkit.Material;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.File; import java.io.File;
@ -9,8 +13,6 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import com.dre.brewery.P;
public class ConfigUpdater { public class ConfigUpdater {
private ArrayList<String> config = new ArrayList<>(); private ArrayList<String> config = new ArrayList<>();
@ -47,7 +49,7 @@ public class ConfigUpdater {
} }
public void saveConfig() { public void saveConfig() {
StringBuilder stringBuilder = new StringBuilder(""); StringBuilder stringBuilder = new StringBuilder();
for (String line : config) { for (String line : config) {
stringBuilder.append(line).append("\n"); stringBuilder.append(line).append("\n");
} }
@ -82,7 +84,7 @@ public class ConfigUpdater {
// ---- Updating to newer Versions ---- // ---- Updating to newer Versions ----
// Update from a specified Config version and language to the newest version // Update from a specified Config version and language to the newest version
public void update(String fromVersion, String lang) { public void update(String fromVersion, boolean oldMat, String lang) {
if (fromVersion.equals("0.5")) { if (fromVersion.equals("0.5")) {
// Version 0.5 was only released for de, but with en as setting, so default to de // Version 0.5 was only released for de, but with en as setting, so default to de
if (!lang.equals("de")) { if (!lang.equals("de")) {
@ -144,11 +146,17 @@ public class ConfigUpdater {
fromVersion = "1.5"; fromVersion = "1.5";
} }
if (fromVersion.equals("1.5")) { if (fromVersion.equals("1.5") || fromVersion.equals("1.6")) {
fromVersion = "1.6"; update15(P.use1_13, de);
fromVersion = "1.7";
oldMat = false;
} }
if (!fromVersion.equals("1.6")) { if (P.use1_13 && oldMat) {
updateMaterials(true);
}
if (!fromVersion.equals("1.7")) {
P.p.log(P.p.languageReader.get("Error_ConfigUpdate", fromVersion)); P.p.log(P.p.languageReader.get("Error_ConfigUpdate", fromVersion));
return; return;
} }
@ -1058,4 +1066,153 @@ public class ConfigUpdater {
} }
//update from 1.5 to 1.7/mc 1.13
private void update15(boolean mc113, boolean langDE) {
updateVersion("1.7");
updateMaterials(mc113);
if (langDE) {
int index = indexOfStart("# ingredients: Auflistung von 'Material oder ID");
if (index != -1) {
setLine(index, "# ingredients: Auflistung von 'Material,Data/Anzahl'");
}
index = indexOfStart("# (Item-ids anstatt Material");
if (index != -1) {
setLine(index, "# (Item-ids anstatt Material können in Bukkit nicht mehr benutzt werden)");
}
index = indexOfStart("# [Beispiel] MATERIAL_oder_id: Name");
if (index != -1) {
setLine(index, "# [Beispiel] MATERIAL: Name nach Gähren");
}
} else {
int index = indexOfStart("# ingredients: List of 'material or id");
if (index != -1) {
setLine(index, "# ingredients: List of 'material,data/amount'");
}
index = indexOfStart("# (Item-ids instead of material are deprecated");
if (index != -1) {
setLine(index, "# (Item-ids instead of material are not supported by bukkit anymore and will not work)");
}
index = indexOfStart("# [Example] MATERIAL_or_id: Name");
if (index != -1) {
setLine(index, "# [Example] MATERIAL: Name after cooking");
}
}
}
// Update all Materials to Minecraft 1.13
private void updateMaterials(boolean toMC113) {
int index;
if (toMC113) {
index = indexOfStart("oldMat:");
if (index != -1) {
config.remove(index);
}
} else {
index = indexOfStart("version:");
if (index != -1) {
addLines(index + 1, "oldMat: true");
}
}
index = indexOfStart("pukeItem: ");
String line;
if (index != -1) {
line = config.get(index);
if (line.length() > 10) {
setLine(index, convertMaterial(line, "pukeItem: ", "", toMC113));
}
}
index = indexOfStart("drainItems:");
if (index != -1) {
index++;
while (config.get(index).startsWith("-")) {
setLine(index, convertMaterial(config.get(index), "- ", "(,.*|)/.*", toMC113));
index++;
}
}
index = indexOfStart("recipes:");
if (index != -1) {
index++;
int endIndex = indexOfStart("useWorldGuard:");
if (endIndex < index) {
endIndex = indexOfStart("enableChatDistortion:");
}
if (endIndex < index) {
endIndex = indexOfStart("words:");
}
if (endIndex < index) {
endIndex = config.size();
}
while (index < endIndex) {
if (config.get(index).matches("^\\s+ingredients:.*")) {
index++;
while (config.get(index).matches("^\\s+- .+")) {
line = config.get(index);
setLine(index, convertMaterial(line, "^\\s+- ", "(,.*|)/.*", toMC113));
index++;
}
} else if (config.get(index).startsWith("cooked:")) {
index++;
while (config.get(index).matches("^\\s\\s+.+")) {
line = config.get(index);
setLine(index, convertMaterial(line, "^\\s\\s+", ":.*", toMC113));
index++;
}
}
index++;
}
}
}
private String convertMaterial(String line, String regexPrefix, String regexPostfix, boolean toMC113) {
if (!toMC113) {
return convertIdtoMaterial(line, regexPrefix, regexPostfix);
}
String mat = line.replaceFirst(regexPrefix, "").replaceFirst(regexPostfix, "");
Material material;
if (mat.equalsIgnoreCase("LONG_GRASS")) {
material = Material.GRASS;
} else {
material = Material.matchMaterial(mat, true);
}
if (material == null) {
return line;
}
String matnew = material.name();
if (!mat.equalsIgnoreCase(matnew)) {
return line.replaceAll(mat, matnew);
} else {
return line;
}
}
private String convertIdtoMaterial(String line, String regexPrefix, String regexPostfix) {
String idString = line.replaceFirst(regexPrefix, "").replaceFirst(regexPostfix, "");
int id = P.p.parseInt(idString);
if (id > 0) {
Material material = LegacyUtil.getMaterial(id);
if (material == null) {
P.p.errorLog("Could not find Material with id: " + line);
return line;
} else {
return line.replaceAll(idString, material.name());
}
} else {
return line;
}
}
} }

View File

@ -67,6 +67,7 @@ public class PlayerListener implements Listener {
// reset cauldron when refilling to prevent unlimited source of potions // reset cauldron when refilling to prevent unlimited source of potions
} else if (materialInHand == Material.WATER_BUCKET) { } else if (materialInHand == Material.WATER_BUCKET) {
if (!P.use1_9) { if (!P.use1_9) {
// We catch >=1.9 cases in the Cauldron Listener
if (LegacyUtil.getFillLevel(clickedBlock) == 1) { if (LegacyUtil.getFillLevel(clickedBlock) == 1) {
// will only remove when existing // will only remove when existing
BCauldron.remove(clickedBlock); BCauldron.remove(clickedBlock);