Version 2.1 & Config Updater

Also Implements #229
This commit is contained in:
Sn0wStorm 2020-04-08 13:12:33 +02:00
parent 0e5893472b
commit 44310e0e36
18 changed files with 297 additions and 14 deletions

View File

@ -4,7 +4,7 @@
<groupId>com.dre</groupId>
<artifactId>Brewery</artifactId>
<version>2.0.1</version>
<version>2.1</version>
<name>Brewery</name>
<properties>

View File

@ -46,6 +46,10 @@ drainItems:
# Zeit (in Tagen) die Trunkenheitsdaten nach offlinegehen eines Spielers im Speicher verbleiben, um z.B. Kater-Effekte anzuwenden. [7]
hangoverDays: 7
# Ob das craften und das benutzen des Trank-Versiegelungs-Tisches aktiviert ist (2 Flaschen über 4 Holz) [true, true]
craftSealingTable: true
enableSealingTable: true
# Färben der Iteminformationen je nach Qualität während sie sich 1. im Fass und/oder 2. im Braustand befinden [true, true]
colorInBarrels: true
colorInBrewer: true
@ -65,6 +69,7 @@ maxBrewsInMCBarrels: 6
# Benutzte Zutaten und andere Brau-Daten werden in allen Brewery Tränken gespeichert. Um zu verhindern,
# dass gehackte clients diese Daten auslesen um Rezepte herauszufinden, können diese encodiert werden.
# Einziger Nachteil: Tränke können nur auf Servern mit dem gleichen encodeKey benutzt werden.
# Wenn Brewery Tränke auf mehreren (Bungeecord) Servern benutzt werden, unten unter 'multiServerDB' eine gemeinsame Datenbank eintragen.
# Dies kann also aktiviert werden um Rezept-cheating schwerer zu machen, aber keine Tränke per World Download, Schematic, o.ä. geteilt werden. [false]
enableEncode: false
encodeKey: 0
@ -80,7 +85,7 @@ autosave: 3
debug: false
# Config Version
version: '2.0'
version: '2.1'
oldMat: true
@ -421,6 +426,29 @@ useCitadel: true
useLogBlock: true
# -- MultiServer/BungeeCord --
# Wenn Brewery auf mehreren Servern läuft und diese zB mit BungeeCord verbunden sind,
# sollte hier eine gemeinsame Datenbank eingetragen werden.
# Dann wird Betrunkenheit auf den Servern synchronisiert und encodierte Tränke können auf allen Servern benutzt werden.
multiServerDB:
# Soll die Datenbank-Synchronisation aktiviert sein
enabled: false
# Soll die Betrunkenheit von Spielern synchronisiert werden
syncDrunkeness: true
host: localhost
port: '3306'
user: minec
password: xyz
database: base
# -- Verschiedene weitere Einstellungen --
# Ob Items in der Zweithand auch in den Kessel geworfen werden sollen [false]
useOffhandForCauldron: false
# -- Chat Veränderungs Einstellungen --
# Ob geschriebener Chat bei großer Trunkenheit abgefälscht werden soll,

View File

@ -46,6 +46,10 @@ drainItems:
# Time (in days) that drunkeness-data stays in memory after a player goes offline, to apply hangover etc. [7]
hangoverDays: 7
# If crafting and using of the Brew Sealing Table is enabled (2 Bottles over 4 Planks) [true, true]
craftSealingTable: true
enableSealingTable: true
# Color the Item information (lore) depending on quality while it is 1. in a barrel and/or 2. in a brewing stand [true, true]
colorInBarrels: true
colorInBrewer: true
@ -66,6 +70,7 @@ maxBrewsInMCBarrels: 6
# hacked clients from reading what exactly was used to brew an item, the data can be encoded/scrambled.
# This is a fast process to stop players from hacking out recipes, once they get hold of a brew.
# Only drawback: brew items can only be used on another server with the same encodeKey.
# When using Brews on multiple (BungeeCord) Servers, define a shared Database below at 'multiServerDB'
# So enable this if you want to make recipe cheating harder, but don't share any brews by world download, schematics, or other means. [false]
enableEncode: false
encodeKey: 0
@ -81,7 +86,7 @@ autosave: 3
debug: false
# Config Version
version: '2.0'
version: '2.1'
oldMat: true
@ -423,6 +428,28 @@ useCitadel: true
useLogBlock: true
# -- MultiServer/BungeeCord --
# If Brewery is running on multiple connected Servers (via BungeeCord)
# a shared Database can be used here to synchronise drunkeness and to be able to use encoded brews between them.
multiServerDB:
# If using the Database is enabled
enabled: false
# If the drunkeness of players should be synchronised between Servers
syncDrunkeness: true
host: localhost
port: '3306'
user: minec
password: xyz
database: base
# -- Various Other Settings --
# If items in Offhand should be added to the cauldron as well [false]
useOffhandForCauldron: false
# -- Chat Distortion Settings --
# If written Chat is distorted when the Player is Drunk, so that it looks like drunk writing

View File

@ -47,6 +47,10 @@ drainItems:
# 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
# If crafting and using of the Brew Sealing Table is enabled (2 Bottles over 4 Planks) [true, true]
craftSealingTable: true
enableSealingTable: true
# Colorer les informations d'objets (lore) au dépend de la qualité dans un tonneau et/ou dans un stand de brassage (l'alambic) [true, true]
colorInBarrels: true
colorInBrewer: true
@ -67,6 +71,7 @@ maxBrewsInMCBarrels: 6
# Pour empêcher les clients piratés de lire exactement ce qui a été utilisé pour infuser un élément, les données peuvent être encodées/brouillées.
# Il s'agit d'un processus rapide pour empêcher les joueurs de pirater des recettes, une fois qu'ils mettent la main sur une bière.
# Seul inconvénient: Les boissons brassicoles ne peuvent être utilisés que sur un autre serveur avec la même clé de chiffrement.
# Lorsque vous utilisez des boissons brassicoles sur plusieurs serveurs (BungeeCord), définissez une base de données partagée ci-dessous à "multiServerDB".
# Activez cette option si vous voulez rendre la tricherie des recettes plus difficile, mais ne partagez pas les infusions par téléchargement mondial, schémas ou autres moyens.
enableEncode: false
encodeKey: 0
@ -82,7 +87,7 @@ autosave: 3
debug: false
# Version de configuration
version: '2.0'
version: '2.1'
oldMat: true
@ -418,6 +423,28 @@ useCitadel: true
useLogBlock: true
# -- MultiServer/BungeeCord --
# Si Brewery est exécuté sur plusieurs serveurs connectés (via BungeeCord), une base de données partagée peut être utilisée
# ici pour synchroniser l'ivresse et pour pouvoir utiliser des boissons codées entre elles.
multiServerDB:
# Si l'utilisation de la base de données est activée
enabled: false
# Si l'ivresse des joueurs devait être synchronisée entre les serveurs
syncDrunkeness: true
host: localhost
port: '3306'
user: minec
password: xyz
database: base
# -- Divers autres paramètres --
# If items in Offhand should be added to the cauldron as well [false]
useOffhandForCauldron: false
# -- Paramètres de la distorsion du Chat --
# Si le Chat écrit est déformé quand le joueur est ivre, de sorte qu'il ressemble à un chat bourré en train d'écrire

View File

@ -46,6 +46,10 @@ drainItems:
# 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
# If crafting and using of the Brew Sealing Table is enabled (2 Bottles over 4 Planks) [true, true]
craftSealingTable: true
enableSealingTable: true
# Colora la descrizione dell'item in base alla qualità mentre è in un barile o in un alambicco [true, true]
colorInBarrels: true
colorInBrewer: true
@ -66,6 +70,7 @@ maxBrewsInMCBarrels: 6
# hacked clients from reading what exactly was used to brew an item, the data can be encoded/scrambled.
# This is a fast process to stop players from hacking out recipes, once they get hold of a brew.
# Only drawback: brew items can only be used on another server with the same encodeKey.
# When using Brews on multiple (BungeeCord) Servers, define a shared Database below at 'multiServerDB'
# So enable this if you want to make recipe cheating harder, but don't share any brews by world download, schematics, or other means. [false]
enableEncode: false
encodeKey: 0
@ -81,7 +86,7 @@ autosave: 3
debug: false
# Versione del config
version: '2.0'
version: '2.1'
oldMat: true
@ -410,6 +415,28 @@ useCitadel: true
useLogBlock: true
# -- MultiServer/BungeeCord --
# If Brewery is running on multiple connected Servers (via BungeeCord)
# a shared Database can be used here to synchronise drunkeness and to be able to use encoded brews between them.
multiServerDB:
# If using the Database is enabled
enabled: false
# If the drunkeness of players should be synchronised between Servers
syncDrunkeness: true
host: localhost
port: '3306'
user: minec
password: xyz
database: base
# -- Various Other Settings --
# If items in Offhand should be added to the cauldron as well [false]
useOffhandForCauldron: false
# -- Imostazioni di distorsione della chat --
# If written Chat is distorted when the Player is Drunk,

View File

@ -85,7 +85,7 @@ autosave: 3
debug: false
# Config Version
version: '2.0'
version: '2.1'
@ -802,6 +802,12 @@ multiServerDB:
database: base
# -- Verschiedene weitere Einstellungen --
# Ob Items in der Zweithand auch in den Kessel geworfen werden sollen [false]
useOffhandForCauldron: false
# -- Chat Veränderungs Einstellungen --
# Ob geschriebener Chat bei großer Trunkenheit abgefälscht werden soll,

View File

@ -86,7 +86,7 @@ autosave: 3
debug: false
# Config Version
version: '2.0'
version: '2.1'
@ -795,6 +795,12 @@ multiServerDB:
database: base
# -- Various Other Settings --
# If items in Offhand should be added to the cauldron as well [false]
useOffhandForCauldron: false
# -- Chat Distortion Settings --
# If written Chat is distorted when the Player is Drunk, so that it looks like drunk writing

View File

@ -47,6 +47,10 @@ drainItems:
# 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
# If crafting and using of the Brew Sealing Table is enabled (2 Bottles over 4 Planks) [true, true]
craftSealingTable: true
enableSealingTable: true
# Colorer les informations d'objets (lore) au dépend de la qualité dans un tonneau et/ou dans un stand de brassage (l'alambic) [true, true]
colorInBarrels: true
colorInBrewer: true
@ -83,7 +87,7 @@ autosave: 3
debug: false
# Version de configuration
version: '2.0'
version: '2.1'
@ -797,6 +801,12 @@ multiServerDB:
database: base
# -- Divers autres paramètres --
# If items in Offhand should be added to the cauldron as well [false]
useOffhandForCauldron: false
# -- Paramètres de la distorsion du Chat --
# Si le Chat écrit est déformé quand le joueur est ivre, de sorte qu'il ressemble à un chat bourré en train d'écrire

View File

@ -46,6 +46,10 @@ drainItems:
# 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
# If crafting and using of the Brew Sealing Table is enabled (2 Bottles over 4 Planks) [true, true]
craftSealingTable: true
enableSealingTable: true
# Colora la descrizione dell'item in base alla qualità mentre è in un barile o in un alambicco [true, true]
colorInBarrels: true
colorInBrewer: true
@ -82,7 +86,7 @@ autosave: 3
debug: false
# Versione del config
version: '2.0'
version: '2.1'
@ -791,6 +795,12 @@ multiServerDB:
database: base
# -- Various Other Settings --
# If items in Offhand should be added to the cauldron as well [false]
useOffhandForCauldron: false
# -- Imostazioni di distorsione della chat --
# If written Chat is distorted when the Player is Drunk,

View File

@ -48,6 +48,10 @@ drainItems:
# 最大玩家下线记忆时长(单位为天). 饮酒的记忆保持时间, 便于计算宿醉.[7]
hangoverDays: 7
# If crafting and using of the Brew Sealing Table is enabled (2 Bottles over 4 Planks) [true, true]
craftSealingTable: true
enableSealingTable: true
# 饮品上是否显示带颜色的提示, 颜色由执行步骤的正误决定. 第一项为在熟成酒桶内显示颜色, 第二项为在酿造台内显示颜色.[true, true]
colorInBarrels: true
colorInBrewer: true
@ -84,7 +88,7 @@ autosave: 3
debug: false
# 配置文件版本
version: '2.0'
version: '2.1'
@ -795,6 +799,12 @@ multiServerDB:
database: base
# -- Various Other Settings --
# If items in Offhand should be added to the cauldron as well [false]
useOffhandForCauldron: false
# -- 口糊设置 --
# 醉酒的玩家会口糊,

View File

@ -4,6 +4,7 @@ Brew_BadPotion: Potion ruinée
Brew_BarrelRiped: Baril âgé
Brew_DistillUndefined: Distillation indéfinie
Brew_Distilled: Distillé
Brew_LessDistilled: Moins distillé
Brew_HundredsOfYears: Centaines d´années
Brew_Ingredients: Ingrédients
Brew_MinutePluralPostfix: s
@ -33,6 +34,9 @@ CMD_UnLabel: '&aLabel supprimé!'
# Erreurs
Error_ConfigUpdate: 'La version de la configuration de Brewery est inconnue: v&v1, la config n´a pas été mise à jour !'
Error_ItemNotPotion: '&cL´item dans votre main n´a pas pu être identifié comme une potion !'
Error_SealingTableDisabled: '&cLa table de scellage est désactivée'
Error_SealedAlwaysStatic: 'Les boissons scellées sont toujours statiques!'
Error_AlreadyUnlabeled: '&cLe label est déjà supprimé!'
Error_NoBarrelAccess: '&cVous n´avez pas la permission d´acceder à ce baril !'
Error_NoBrewName: '&cAucune recette avec le nom: &v1&c n´a été trouvée!'
Error_NoPermissions: '&cVous ne pouvez pas faire ça !'
@ -46,6 +50,7 @@ Error_YmlRead: 'Could not read file config.yml, please make sure the file is in
Etc_Barrel: Baril
Etc_Page: Page
Etc_Usage: 'Utilise:'
Etc_SealingTable: 'Table de scellage des boissons'
# Aide
Help_Copy: '&6/brew copy [Quantity]&9 Copie la potion qui est dans votre main'
@ -59,6 +64,7 @@ Help_Reload: '&6/brew reload &9Reload la config'
Help_Configname: '&6/brew ItemName &9Display name of item in hand for the config'
Help_Static: '&6/brew static &9Rend une boisson statique -> Plus affectée par l´âge ou la distillation'
Help_UnLabel: '&6/brew unlabel &9Supprime l´étiquette détaillée d´une potion'
Help_Seal: '&6/brew seal &9Sceller les boissons à vendre en magasin'
Help_Wakeup: '&6/brew wakeup list <Page>&9 Affiche une liste de tous les points de réveil'
Help_WakeupAdd: '&6/brew wakeup add &9Ajoute un point de réveil à votre position'
Help_WakeupCheck: '&6/brew wakeup check &9Téléportation vers tous les points de réveil'
@ -96,3 +102,4 @@ Player_WakeNoCheck: '&cAucun point de réveil n´est actif pour le moment !'
Player_WakeNoPoints: '&cIl n´y a pas de point de réveil !'
Player_WakeNotExist: '&cLe point de réveil avec l´ID: &6&v1 &cdn´existe pas !'
Player_WakeTeleport: 'Téléportation vers le point de réveil avec l´ID : &6&v1&f A la position: &6&v2 &v3, &v4, &v5'
Player_ShopSealBrew: '&eles boissons doivent être scellées avant d´être vendues'

View File

@ -4,6 +4,7 @@ Brew_BadPotion: Pozione rovinata
Brew_BarrelRiped: Invecchiata in barile
Brew_DistillUndefined: Distillato indefinito
Brew_Distilled: Distillato
Brew_LessDistilled: Less Distilled
Brew_HundredsOfYears: Centinaia di anni
Brew_Ingredients: Ingredienti
Brew_MinutePluralPostfix: /i
@ -33,6 +34,9 @@ CMD_UnLabel: '&aEtichetta rimossa!'
# Errori
Error_ConfigUpdate: 'Versione della configurazione di Brewery sconosciuta: v&v1, la configurazione non è stato aggiornata!'
Error_ItemNotPotion: '&cL''oggetto nella tua mano non è una pozione!'
Error_SealingTableDisabled: '&cThe Sealing Table is disabled'
Error_SealedAlwaysStatic: 'Sealed Brews are always static!'
Error_AlreadyUnlabeled: '&cThe Brew in your hand is already unlabeled!'
Error_NoBarrelAccess: '&cNon hai il permesso di aprire questo barile!'
Error_NoBrewName: '&cNon è stata trovata nessuna ricetta chiamata ''&v1&c''!'
Error_NoPermissions: '&cNon hai il permesso di farlo!'
@ -46,6 +50,7 @@ Error_YmlRead: 'Could not read file config.yml, please make sure the file is in
Etc_Barrel: Barile
Etc_Page: Pagina
Etc_Usage: 'Utilizzo:'
Etc_SealingTable: Brew Sealing Table
# Aiuto
Help_Copy: '&6/brew copy [Quantità]&9 Copia la pozione che tieni in mano'
@ -59,6 +64,7 @@ Help_Reload: '&6/brew reload &9Ricarica la configurazione'
Help_Configname: '&6/brew ItemName &9Display name of item in hand for the config'
Help_Static: '&6/brew static &9Rende la miscela statica quindi non distillabile e invecchiabile ulteriormente.'
Help_UnLabel: '&6/brew unlabel &9Rimuove la descrizione dettagliata di una pozione.'
Help_Seal: '&6/brew seal &9Seal Brews for selling in shops'
Help_Wakeup: '&6/brew wakeup list <Pagina>&9 Mostra tutti i punti di risveglio.'
Help_WakeupAdd: '&6/brew wakeup add &9Crea un punto di risveglio alla tua posizione corrente.'
Help_WakeupCheck: '&6/brew wakeup check &9Ti teletrasporta nei punti di risveglio uno alla volta'
@ -96,3 +102,4 @@ Player_WakeNoCheck: '&cNessun punto di risveglio attivo al momento.'
Player_WakeNoPoints: '&cNon ci sono punti di risveglio!'
Player_WakeNotExist: '&cIl punto di risveglio con id &6&v1 &cnon esiste!'
Player_WakeTeleport: 'Teletrasportato al punto di risveglio di id &6&v1&f alla posizione &6&v2 &v3, &v4, &v5'
Player_ShopSealBrew: '&eBrews should be sealed before selling them'

View File

@ -4,6 +4,7 @@ Brew_BadPotion: 失敗的藥水
Brew_BarrelRiped: 貯存陳化
Brew_DistillUndefined: 無法確定的蒸餾
Brew_Distilled: 蒸餾
Brew_LessDistilled: Less Distilled
Brew_HundredsOfYears: 數百年
Brew_Ingredients: 配料
Brew_MinutePluralPostfix:
@ -33,6 +34,9 @@ CMD_UnLabel: '&a標籤已刪除'
# Error
Error_ConfigUpdate: '未知 釀酒 設定檔版本: v&v1,設定檔沒有更新!'
Error_ItemNotPotion: '&c你手上的物品不能確定為藥水'
Error_SealingTableDisabled: '&cThe Sealing Table is disabled'
Error_SealedAlwaysStatic: 'Sealed Brews are always static!'
Error_AlreadyUnlabeled: '&cThe Brew in your hand is already unlabeled!'
Error_NoBarrelAccess: '&c你沒有權限存取'
Error_NoBrewName: '&c沒有這個配方: ''&v1&c'' 找到!'
Error_NoPermissions: '&c你沒有權限這樣做'
@ -46,6 +50,7 @@ Error_YmlRead: 'Could not read file config.yml, please make sure the file is in
Etc_Barrel: 釀造桶
Etc_Page: 頁數
Etc_Usage: '用法:'
Etc_SealingTable: Brew Sealing Table
# Help
Help_Copy: '&6/brew copy [數量]&9 複製手中的藥水'
@ -59,6 +64,7 @@ Help_Reload: '&6/brew reload &9重新加載設定檔'
Help_Configname: '&6/brew ItemName &9Display name of item in hand for the config'
Help_Static: '&6/brew static &9使釀造靜止 - >不再進一步老化或蒸餾'
Help_UnLabel: '&6/brew unlabel &9刪除藥水的詳細標籤'
Help_Seal: '&6/brew seal &9Seal Brews for selling in shops'
Help_Wakeup: '&6/brew wakeup list <頁數>&9 列出所有喚醒點'
Help_WakeupAdd: '&6/brew wakeup add &9在當前位置添加喚醒點'
Help_WakeupCheck: '&6/brew wakeup check &9傳送到所有喚醒點'
@ -96,3 +102,4 @@ Player_WakeNoCheck: '&c目前沒有喚醒點是處於活動狀態'
Player_WakeNoPoints: '&c沒有喚醒點!'
Player_WakeNotExist: '&c這個喚醒點 id: &6&v1 &c不存在!'
Player_WakeTeleport: '傳送到這個喚醒點 id: &6&v1&f 在位置: &6&v2 &v3, &v4, &v5'
Player_ShopSealBrew: '&eBrews should be sealed before selling them'

View File

@ -4,6 +4,7 @@ Brew_BadPotion: 酿坏了的废液
Brew_BarrelRiped: 木桶熟成
Brew_DistillUndefined: 未名蒸馏液
Brew_Distilled: 蒸馏
Brew_LessDistilled: Less Distilled
Brew_HundredsOfYears: 百年陈酿
Brew_Ingredients: 原料
Brew_MinutePluralPostfix: ''
@ -33,6 +34,9 @@ CMD_UnLabel: '&a标签已被去除!'
# Error
Error_ConfigUpdate: '未知的配置版本:v&v1, 插件配置未更新!'
Error_ItemNotPotion: '&c你手上的物品并未成功地被认定为饮品!'
Error_SealingTableDisabled: '&cThe Sealing Table is disabled'
Error_SealedAlwaysStatic: 'Sealed Brews are always static!'
Error_AlreadyUnlabeled: '&cThe Brew in your hand is already unlabeled!'
Error_NoBarrelAccess: '&c你没有权限与该木桶互动!'
Error_NoBrewName: '&c未找到名字为''&v1&c''的饮品!'
Error_NoPermissions: '&c你没有权限这样做.'
@ -46,6 +50,7 @@ Error_YmlRead: '无法读取config.yml, 请保证该文件符合正确的yml格
Etc_Barrel: 木桶
Etc_Page:
Etc_Usage: '用途:'
Etc_SealingTable: Brew Sealing Table
# Help
Help_Copy: '&6/brew copy [数量] &9复制当前手中的饮品.'
@ -59,6 +64,7 @@ Help_Reload: '&6/brew reload &9重载插件配置, 可用以重载饮品配方.'
Help_Configname: '&6/brew ItemName &9显示手中物品的配置名称'
Help_Static: '&6/brew static &9将手中饮品静滞化, 这将阻止其被蒸馏或继续熟成.'
Help_UnLabel: '&6/brew unlabel &9去除饮品的附加信息.'
Help_Seal: '&6/brew seal &9Seal Brews for selling in shops'
Help_Wakeup: '&6/brew wakeup list <页数> &9列出所有的苏醒处, 醉酒后下线的玩家再上线可能会在这些地方醒来.'
Help_WakeupAdd: '&6/brew wakeup add &9添加苏醒处.'
Help_WakeupCheck: '&6/brew wakeup check &9传送至每一个苏醒处进行一一检查.'
@ -96,3 +102,4 @@ Player_WakeNoCheck: '&c目前没有执行苏醒处检查.'
Player_WakeNoPoints: '&c目前没有设定任何一个苏醒处!'
Player_WakeNotExist: '&cid为: &6&v1 &c的苏醒处并不存在!'
Player_WakeTeleport: '前往id为: &6&v1 &f坐标为: &6&v2 &v3, &v4, &v5 &r的苏醒处.'
Player_ShopSealBrew: '&eBrews should be sealed before selling them'

View File

@ -1,5 +1,5 @@
name: Brewery
version: 2.0.1
version: 2.1
main: com.dre.brewery.P
softdepend: [LWC, LogBlock, WorldGuard, GriefPrevention, Vault, ChestShop]
authors: [Milan Albrecht, Frank Baumann, ProgrammerDan, Daniel Saukel]

View File

@ -1,6 +1,7 @@
package com.dre.brewery;
import com.dre.brewery.api.events.IngedientAddEvent;
import com.dre.brewery.filedata.BConfig;
import com.dre.brewery.recipe.BCauldronRecipe;
import com.dre.brewery.recipe.RecipeItem;
import com.dre.brewery.utility.BUtil;
@ -268,7 +269,7 @@ public class BCauldron {
materialInHand = item.getType();
handSwap = true;
} else {
item = event.getItem();
item = BConfig.useOffhandForCauldron ? event.getItem() : null;
}
}
}

View File

@ -39,7 +39,7 @@ import java.util.Map;
public class BConfig {
public static final String configVersion = "2.0";
public static final String configVersion = "2.1";
public static boolean updateCheck;
public static CommandSender reloader;
@ -59,6 +59,9 @@ public class BConfig {
// Barrel
public static boolean openEverywhere;
// Cauldron
public static boolean useOffhandForCauldron;
//BPlayer
public static Map<Material, Integer> drainItems = new HashMap<>();// DrainItem Material and Strength
public static Material pukeItem;
@ -237,6 +240,7 @@ public class BConfig {
enableEncode = config.getBoolean("enableEncode", false);
openEverywhere = config.getBoolean("openLargeBarrelEverywhere", false);
MCBarrel.maxBrews = config.getInt("maxBrewsInMCBarrels", 6);
useOffhandForCauldron = config.getBoolean("useOffhandForCauldron", false);
Brew.loadSeed(config, new File(P.p.getDataFolder(), "config.yml"));

View File

@ -213,8 +213,19 @@ public class ConfigUpdater {
} else {
update18en(yml);
}
fromVersion = "2.0";
}
if (fromVersion.equals("2.0")) {
if (de) {
update20de();
} else if (lang.equals("fr")) {
update20fr();
} else {
update20en();
}
updateVersion(BConfig.configVersion);
fromVersion = BConfig.configVersion;
fromVersion = "2.1";
}
if (P.use1_13 && oldMat) {
@ -1578,6 +1589,94 @@ public class ConfigUpdater {
}
private void update20de() {
addLinesAt(new String[]{"hangoverDays", "colorInBrewer", "encodeKey"}, 1, "",
"# Ob das craften und das benutzen des Trank-Versiegelungs-Tisches aktiviert ist (2 Flaschen über 4 Holz) [true, true]",
"craftSealingTable: true",
"enableSealingTable: true");
addLinesAt(new String[]{"useLogBlock", "useGMInventories", "# -- Plugin Kompatibli", "# Es gibt noch viele Minecraft Items", "version"}, 1, "", "",
"# -- MultiServer/BungeeCord --",
"# Wenn Brewery auf mehreren Servern läuft und diese zB mit BungeeCord verbunden sind,",
"# sollte hier eine gemeinsame Datenbank eingetragen werden.",
"# Dann wird Betrunkenheit auf den Servern synchronisiert und encodierte Tränke können auf allen Servern benutzt werden.",
"",
"multiServerDB:",
" # Soll die Datenbank-Synchronisation aktiviert sein",
" enabled: false",
" # Soll die Betrunkenheit von Spielern synchronisiert werden",
" syncDrunkeness: true",
" host: localhost",
" port: '3306'",
" user: minec",
" password: xyz",
" database: base",
"",
"",
"# -- Verschiedene weitere Einstellungen --",
"",
"# Ob Items in der Zweithand auch in den Kessel geworfen werden sollen [false]",
"useOffhandForCauldron: false");
}
private void update20fr() {
addLinesAt(new String[]{"hangoverDays", "colorInBrewer", "encodeKey"}, 1, "",
"# If crafting and using of the Brew Sealing Table is enabled (2 Bottles over 4 Planks) [true, true]",
"craftSealingTable: true",
"enableSealingTable: true");
addLinesAt(new String[]{"useLogBlock", "useGMInventories", "# -- Compatibilit", "# There are a lot of items in Minecraft ", "version"}, 1, "", "",
"# -- MultiServer/BungeeCord --",
"# Si Brewery est exécuté sur plusieurs serveurs connectés (via BungeeCord), une base de données partagée peut être utilisée",
"# ici pour synchroniser l'ivresse et pour pouvoir utiliser des boissons codées entre elles.",
"",
"multiServerDB:",
" # Si l'utilisation de la base de données est activée",
" enabled: false",
" # Si l'ivresse des joueurs devait être synchronisée entre les serveurs",
" syncDrunkeness: true",
" host: localhost",
" port: '3306'",
" user: minec",
" password: xyz",
" database: base",
"",
"",
"# -- Divers autres paramètres --",
"",
"# If items in Offhand should be added to the cauldron as well [false]",
"useOffhandForCauldron: false");
}
private void update20en() {
addLinesAt(new String[]{"hangoverDays", "colorInBrewer", "encodeKey"}, 1, "",
"# If crafting and using of the Brew Sealing Table is enabled (2 Bottles over 4 Planks) [true, true]",
"craftSealingTable: true",
"enableSealingTable: true");
addLinesAt(new String[]{"useLogBlock", "useGMInventories", "# -- Plugin Compatibility", "# # There are a lot of items in Minecraft", "version"}, 1, "", "",
"# -- MultiServer/BungeeCord --",
"# If Brewery is running on multiple connected Servers (via BungeeCord)",
"# a shared Database can be used here to synchronise drunkeness and to be able to use encoded brews between them.",
"",
"multiServerDB:",
" # If using the Database is enabled",
" enabled: false",
" # If the drunkeness of players should be synchronised between Servers",
" syncDrunkeness: true",
" host: localhost",
" port: '3306'",
" user: minec",
" password: xyz",
" database: base",
"",
"",
"# -- Various Other Settings --",
"",
"# If items in Offhand should be added to the cauldron as well [false]",
"useOffhandForCauldron: false");
}
private void convertCookedSection(FileConfiguration yml, int toLine) {