1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-11-29 05:55:27 +01:00
The potion names & the colors not working correctly.
This commit is contained in:
montlikadani 2018-10-22 19:16:06 +02:00
parent 5b4f43b1af
commit 32db8ef1ea
3 changed files with 4 additions and 4 deletions

View File

@ -214,7 +214,7 @@ public class NameTranslatorManager {
String meta = one.split("-")[0];
String MCName = one.split("-")[1];
String Name = ItemFile.getConfig().getString("PotionNamesList." + one);
ListOfColors.add(new NameList(id, meta, Name, MCName));
ListOfPotionNames.add(new NameList(id, meta, Name, MCName));
}
if (ListOfPotionNames.size() > 0)
Jobs.consoleMsg("&e[Jobs] Loaded " + ListOfPotionNames.size() + " custom potion names!");

View File

@ -116,8 +116,8 @@ public class ShopManager {
}
if (player.getInventory().firstEmpty() == -1) {
player.sendMessage(Jobs.getLanguage().getMessage("command.shop.info.InvFull"));
return;
player.sendMessage(Jobs.getLanguage().getMessage("command.shop.info.InvFull"));
return;
}
for (String one : item.getCommands()) {

View File

@ -69,7 +69,7 @@ public class JobItems {
ItemMeta meta = item.getItemMeta();
if (this.name != null)
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', name));
if (lore != null) {
if (lore != null && !lore.isEmpty()) {
List<String> TranslatedLore = new ArrayList<>();
for (String oneLore : lore) {
TranslatedLore.add(ChatColor.translateAlternateColorCodes('&', oneLore.replace("[player]", player.getName())));