From 3ee9ced7894eac82077dc66ce31416e71fa48d2a Mon Sep 17 00:00:00 2001 From: Sn0wStorm Date: Sun, 18 Aug 2019 21:46:03 +0200 Subject: [PATCH] Change Command ConfigName -> ItemName --- resources/config/v12/de/config.yml | 2 +- resources/config/v12/en/config.yml | 2 +- resources/config/v12/fr/config.yml | 2 +- resources/config/v12/it/config.yml | 2 +- resources/config/v13/de/config.yml | 2 +- resources/config/v13/en/config.yml | 2 +- resources/config/v13/fr/config.yml | 2 +- resources/config/v13/it/config.yml | 2 +- resources/config/v13/zh/config.yml | 2 +- resources/languages/de.yml | 2 +- resources/languages/en.yml | 2 +- resources/languages/fr.yml | 2 +- resources/languages/it.yml | 2 +- resources/languages/tw.yml | 2 +- resources/languages/zh.yml | 2 +- src/com/dre/brewery/filedata/ConfigUpdater.java | 2 +- src/com/dre/brewery/filedata/LanguageReader.java | 2 +- src/com/dre/brewery/listeners/CommandListener.java | 6 +++--- 18 files changed, 20 insertions(+), 20 deletions(-) diff --git a/resources/config/v12/de/config.yml b/resources/config/v12/de/config.yml index dfa8c64d..e0c5dc6b 100644 --- a/resources/config/v12/de/config.yml +++ b/resources/config/v12/de/config.yml @@ -76,7 +76,7 @@ oldMat: true # name: Verschiedene Namen für schlecht/mittel/gut (Farbcodes möglich: z.b. &6) # ingredients: Auflistung von 'Material,Data/Anzahl' -# Halte ein Item in der Hand und benutze /brew configname um dessen Material herauszufinden und für ein Rezept zu benutzen +# Halte ein Item in der Hand und benutze /brew ItemName um dessen Material herauszufinden und für ein Rezept zu benutzen # (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 # Es kann ein Data-Wert (durability) angegeben werden, weglassen ignoriert diesen beim hinzufügen einer Zutat diff --git a/resources/config/v12/en/config.yml b/resources/config/v12/en/config.yml index a800725b..7ac5a6dc 100644 --- a/resources/config/v12/en/config.yml +++ b/resources/config/v12/en/config.yml @@ -73,7 +73,7 @@ oldMat: true # name: Different names for bad/normal/good (Formatting codes possible: such as &6) # ingredients: List of 'material,data/amount' -# With an item in your hand, use /brew configname to get its material for use in a recipe +# With an item in your hand, use /brew ItemName to get its material for use in a recipe # (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 # You can specify a data (durability) value, omitting it will ignore the data value of the added ingredient diff --git a/resources/config/v12/fr/config.yml b/resources/config/v12/fr/config.yml index 47c50a09..962d0157 100644 --- a/resources/config/v12/fr/config.yml +++ b/resources/config/v12/fr/config.yml @@ -73,7 +73,7 @@ oldMat: true # 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,data/montant' -# With an item in your hand, use /brew configname to get its material for use in a recipe +# With an item in your hand, use /brew ItemName to get its material for use in a recipe # (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' # Une liste des matériaux peuvent-être trouvés ici: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html diff --git a/resources/config/v12/it/config.yml b/resources/config/v12/it/config.yml index 5a4b7548..2400d6c7 100644 --- a/resources/config/v12/it/config.yml +++ b/resources/config/v12/it/config.yml @@ -73,7 +73,7 @@ oldMat: true # name: Tre nomi diversi per diverse qualità (cattivo/normale/buono). I codici come &6 possono essere usati. # ingredients: Lista degli ingredienti nel formato materiale,dati/quantità -# With an item in your hand, use /brew configname to get its material for use in a recipe +# With an item in your hand, use /brew ItemName to get its material for use in a recipe # (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 # Puoi specificare dei dati dell'oggetto, ma se omesso sarà semplicemente ignorato. diff --git a/resources/config/v13/de/config.yml b/resources/config/v13/de/config.yml index b473c56d..4a6b0b21 100644 --- a/resources/config/v13/de/config.yml +++ b/resources/config/v13/de/config.yml @@ -75,7 +75,7 @@ version: '1.8' # name: Verschiedene Namen für schlecht/mittel/gut (Farbcodes möglich: z.b. &6) # ingredients: Auflistung von 'Material/Anzahl' -# Halte ein Item in der Hand und benutze /brew configname um dessen Material herauszufinden und für ein Rezept zu benutzen +# Halte ein Item in der Hand und benutze /brew ItemName um dessen Material herauszufinden und für ein Rezept zu benutzen # (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 # cookingtime: Zeit in Echtminuten die die Zutaten kochen müssen diff --git a/resources/config/v13/en/config.yml b/resources/config/v13/en/config.yml index d0c8d7a3..6aaeee23 100644 --- a/resources/config/v13/en/config.yml +++ b/resources/config/v13/en/config.yml @@ -72,7 +72,7 @@ version: '1.8' # name: Different names for bad/normal/good (Formatting codes possible: such as &6) # ingredients: List of 'material/amount' -# With an item in your hand, use /brew configname to get its material for use in a recipe +# With an item in your hand, use /brew ItemName to get its material for use in a recipe # (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 # cookingtime: Time in real minutes ingredients have to boil diff --git a/resources/config/v13/fr/config.yml b/resources/config/v13/fr/config.yml index d34e5744..458acb81 100644 --- a/resources/config/v13/fr/config.yml +++ b/resources/config/v13/fr/config.yml @@ -72,7 +72,7 @@ version: '1.8' # 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/montant' -# With an item in your hand, use /brew configname to get its material for use in a recipe +# With an item in your hand, use /brew ItemName to get its material for use in a recipe # (Les id d'objets à la place des matériaux sont obsolètes pour bukkit) # Ex: 'Sugar_Cane' # Une liste des matériaux peuvent-être trouvés ici: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html diff --git a/resources/config/v13/it/config.yml b/resources/config/v13/it/config.yml index a0c8e943..20cac78d 100644 --- a/resources/config/v13/it/config.yml +++ b/resources/config/v13/it/config.yml @@ -72,7 +72,7 @@ version: '1.8' # name: Tre nomi diversi per diverse qualità (cattivo/normale/buono). I codici come &6 possono essere usati. # ingredients: Lista degli ingredienti nel formato materiale/quantità -# With an item in your hand, use /brew configname to get its material for use in a recipe +# With an item in your hand, use /brew ItemName to get its material for use in a recipe # (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 # cookingtime: Tempo in minuti richiesto dagli ingredienti per bollire diff --git a/resources/config/v13/zh/config.yml b/resources/config/v13/zh/config.yml index d7f5f50e..f2b56087 100644 --- a/resources/config/v13/zh/config.yml +++ b/resources/config/v13/zh/config.yml @@ -73,7 +73,7 @@ version: '1.8' # name: 饮品名称, 可以为 劣质/普通/优质 三种质量的饮品命名(可插入样式代码, 如:&6). # ingredients: 配方列表, 格式为"材料名称/数量". -# 手中持有物品的时候, 可以使用/brew configname来获取其物品id, 便于增改配方 +# 手中持有物品的时候, 可以使用/brew ItemName来获取其物品id, 便于增改配方 # (请勿使用物品ID, 物品ID已被弃用, 使用材料名称是唯一支持的做法.) # 材料名称列表详见此处: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html (可能需要挂梯子进行浏览) # cookingtime: 原料需要在炼药锅内烹制发酵的时间, 单位为现实分钟. diff --git a/resources/languages/de.yml b/resources/languages/de.yml index 6d04a0e5..991e8d32 100644 --- a/resources/languages/de.yml +++ b/resources/languages/de.yml @@ -64,7 +64,7 @@ Help_Info: '&6/brew Info&9 Zeigt deine aktuelle Trunkenheit und Qualität an' Help_InfoOther: '&6/brew Info [Spieler]&9 Zeigt die aktuelle Trunkenheit und Qualität von [Spieler] an' Help_Player: '&6/brew <%Trunkenheit> [Qualität]&9 Setzt Trunkenheit (und Qualität) eines Spielers' Help_Reload: '&6/brew reload &9Config neuladen' -Help_Configname: '&6/brew configname &9Zeigt Name für die Config vom Item in der Hand' +Help_Configname: '&6/brew ItemName &9Zeigt Name für die Config vom Item in der Hand' Help_UnLabel: '&6/brew UnLabel &9Entfernt die genaue Beschriftung des Trankes' Help_Wakeup: '&6/brew Wakeup List &9 Listet alle Aufwachpunkte auf' Help_WakeupAdd: '&6/brew Wakeup Add &9Setzt einen Aufwachpunkt and deiner Position' diff --git a/resources/languages/en.yml b/resources/languages/en.yml index bf26fd1a..84db0f4e 100644 --- a/resources/languages/en.yml +++ b/resources/languages/en.yml @@ -59,7 +59,7 @@ Help_InfoOther: '&6/brew info [Player]&9 Displays the current Drunkeness and Qua Help_Persist: '&6/brew persist &9Make Brew persistent -> copyable by any plugin and technique' Help_Player: '&6/brew <%Drunkeness> [Quality]&9 Sets Drunkeness (and Quality) of a Player' Help_Reload: '&6/brew reload &9Reload config' -Help_Configname: '&6/brew configname &9Display name of item in hand for the config' +Help_Configname: '&6/brew ItemName &9Display name of item in hand for the config' Help_Static: '&6/brew static &9Make Brew static -> No further ageing or distilling' Help_UnLabel: '&6/brew unlabel &9Removes the detailled label of a potion' Help_Wakeup: '&6/brew wakeup list &9 Lists all wakeup points' diff --git a/resources/languages/fr.yml b/resources/languages/fr.yml index ba0c370f..22fe7644 100644 --- a/resources/languages/fr.yml +++ b/resources/languages/fr.yml @@ -59,7 +59,7 @@ Help_InfoOther: '&6/brew info [Player]&9 Affiche l´ivresse actuelle de Help_Persist: '&6/brew persist &9Crée une boisson persistante -> peut être copiée par n´importe quel plugin et technique' Help_Player: '&6/brew <%Drunkeness> [Quality]&9 Définit l´ivresse (et la qualité) du joueur' Help_Reload: '&6/brew reload &9Reload la config' -Help_Configname: '&6/brew configname &9Display name of item in hand for the 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_Wakeup: '&6/brew wakeup list &9 Affiche une liste de tous les points de réveil' diff --git a/resources/languages/it.yml b/resources/languages/it.yml index e1f7e067..952fe33c 100755 --- a/resources/languages/it.yml +++ b/resources/languages/it.yml @@ -59,7 +59,7 @@ Help_InfoOther: '&6/brew info [Giocatore]&9 Mostra l''attuale livello di sbronza Help_Persist: '&6/brew persist &9Rendi una miscela persistente quindi copiabile normalmente in ogni modo e da ogni plugin.' Help_Player: '&6/brew <%Sbronza> [Qualità]&9 Imposta livello di sbronza (e qualità) di un giocatore.' Help_Reload: '&6/brew reload &9Ricarica la configurazione' -Help_Configname: '&6/brew configname &9Display name of item in hand for the config' +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_Wakeup: '&6/brew wakeup list &9 Mostra tutti i punti di risveglio.' diff --git a/resources/languages/tw.yml b/resources/languages/tw.yml index 2deb7c8a..7dfd0f79 100644 --- a/resources/languages/tw.yml +++ b/resources/languages/tw.yml @@ -59,7 +59,7 @@ Help_InfoOther: '&6/brew info [玩家]&9 顯示 [玩家] 當前醉酒程度和 Help_Persist: '&6/brew persist &9使釀造持久化 - >可通過任何插件和技術進行複制' Help_Player: '&6/brew <玩家> <%醉酒> [數量]&9 設置玩家的醉酒度(和酒的品質)' Help_Reload: '&6/brew reload &9重新加載設定檔' -Help_Configname: '&6/brew configname &9Display name of item in hand for the config' +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_Wakeup: '&6/brew wakeup list <頁數>&9 列出所有喚醒點' diff --git a/resources/languages/zh.yml b/resources/languages/zh.yml index cf651883..41b8fdb8 100644 --- a/resources/languages/zh.yml +++ b/resources/languages/zh.yml @@ -59,7 +59,7 @@ Help_InfoOther: '&6/brew info [指定玩家] &9显示指定玩家目前的醉酒 Help_Persist: '&6/brew persist &9将手中的饮品数据固定在服务端, 这将允许其被任何手段复制并饮用而不影响原饮品本体.' Help_Player: '&6/brew <目标玩家> <%醉酒程度> [醉酒质量] &9设定目标玩家的醉酒程度与质量.' Help_Reload: '&6/brew reload &9重载插件配置, 可用以重载饮品配方.' -Help_Configname: '&6/brew configname &9显示手中物品的配置名称' +Help_Configname: '&6/brew ItemName &9显示手中物品的配置名称' Help_Static: '&6/brew static &9将手中饮品静滞化, 这将阻止其被蒸馏或继续熟成.' Help_UnLabel: '&6/brew unlabel &9去除饮品的附加信息.' Help_Wakeup: '&6/brew wakeup list <页数> &9列出所有的苏醒处, 醉酒后下线的玩家再上线可能会在这些地方醒来.' diff --git a/src/com/dre/brewery/filedata/ConfigUpdater.java b/src/com/dre/brewery/filedata/ConfigUpdater.java index b21d93b7..7b98029a 100644 --- a/src/com/dre/brewery/filedata/ConfigUpdater.java +++ b/src/com/dre/brewery/filedata/ConfigUpdater.java @@ -1208,7 +1208,7 @@ private void update17en() { } } if (index != -1) { - addLines(index + 1, "# With an item in your hand, use /brew configname to get its material for use in a recipe"); + addLines(index + 1, "# With an item in your hand, use /brew ItemName to get its material for use in a recipe"); } if (P.use1_13) updateMaterialDescriptions(false); } diff --git a/src/com/dre/brewery/filedata/LanguageReader.java b/src/com/dre/brewery/filedata/LanguageReader.java index 8512f2c0..e1cb2f17 100644 --- a/src/com/dre/brewery/filedata/LanguageReader.java +++ b/src/com/dre/brewery/filedata/LanguageReader.java @@ -127,7 +127,7 @@ private void setDefaults() { defaults.put("Help_WakeupAdd", "&6/brew wakeup add &9Adds a wakeup point at your current position"); defaults.put("Help_WakeupRemove", "&6/brew wakeup remove &9Removes the wakeup point with "); defaults.put("Help_Reload", "&6/brew reload &9Reload config"); - defaults.put("Help_Configname", "&6/brew configname &9Display name of item in hand for the config"); + defaults.put("Help_Configname", "&6/brew ItemName &9Display name of item in hand for the config"); defaults.put("Help_Persist", "&6/brew persist &9Make Brew persistent -> copyable by any plugin and technique"); defaults.put("Help_Static", "&6/brew static &9Make Brew static -> No further ageing or distilling"); defaults.put("Help_Create", "&6/brew create [Quality] [Player] &9Create a Brew with optional quality (1-10)"); diff --git a/src/com/dre/brewery/listeners/CommandListener.java b/src/com/dre/brewery/listeners/CommandListener.java index d6df5892..880b8a0d 100644 --- a/src/com/dre/brewery/listeners/CommandListener.java +++ b/src/com/dre/brewery/listeners/CommandListener.java @@ -43,10 +43,10 @@ public boolean onCommand(CommandSender sender, Command command, String label, St p.msg(sender, p.languageReader.get("Error_NoPermissions")); } - } else if (cmd.equalsIgnoreCase("configname")) { + } else if (cmd.equalsIgnoreCase("configname") || cmd.equalsIgnoreCase("itemname")) { if (sender.hasPermission("brewery.cmd.reload")) { - cmdConfigName(sender); + cmdItemName(sender); } else { p.msg(sender, p.languageReader.get("Error_NoPermissions")); } @@ -364,7 +364,7 @@ public void cmdInfo(CommandSender sender, String playerName) { } - public void cmdConfigName(CommandSender sender) { + public void cmdItemName(CommandSender sender) { if (sender instanceof Player) { Player player = (Player) sender;