v1.1.2 Update || Small change

This update makes a change to the Categories item in the /ah

Changes:
  - Changed the %Category% name in the Categories item to the acual
custom name to allow translation.
This commit is contained in:
BadBones69 2016-11-16 19:12:37 -05:00
parent ac23825caf
commit 92420f2a8a
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@ name: CrazyAuctions
author: BadBones69 author: BadBones69
main: me.badbones69.crazyauctions.Main main: me.badbones69.crazyauctions.Main
website: https://www.spigotmc.org/resources/authors/kicjow.9719/ website: https://www.spigotmc.org/resources/authors/kicjow.9719/
version: 1.1.1 version: 1.1.2
depend: [Vault] depend: [Vault]
description: > description: >
A plugin to auction off items globally. A plugin to auction off items globally.

View File

@ -100,9 +100,10 @@ public class GUI implements Listener{
String name = config.getString("Settings.GUISettings.OtherSettings."+o+".Name"); String name = config.getString("Settings.GUISettings.OtherSettings."+o+".Name");
List<String> lore = new ArrayList<String>(); List<String> lore = new ArrayList<String>();
int slot = config.getInt("Settings.GUISettings.OtherSettings."+o+".Slot"); int slot = config.getInt("Settings.GUISettings.OtherSettings."+o+".Slot");
String cName = Api.color(config.getString("Settings.GUISettings.Category-Settings." + Cat.get(player).getName() + ".Name"));
if(config.contains("Settings.GUISettings.OtherSettings."+o+".Lore")){ if(config.contains("Settings.GUISettings.OtherSettings."+o+".Lore")){
for(String l : config.getStringList("Settings.GUISettings.OtherSettings."+o+".Lore")){ for(String l : config.getStringList("Settings.GUISettings.OtherSettings."+o+".Lore")){
lore.add(l.replaceAll("%Category%", Cat.get(player).getName()).replaceAll("%category%", Cat.get(player).getName())); lore.add(l.replaceAll("%Category%", cName).replaceAll("%category%", cName));
} }
inv.setItem(slot-1, Api.makeItem(id, 1, name, lore)); inv.setItem(slot-1, Api.makeItem(id, 1, name, lore));
}else{ }else{