Merge branch 'lore' into 'Legacy'

Multiple lore lines

See merge request Songoda/EpicHoppers!15

(cherry picked from commit e0eb80b92d1a48160e92592a23c0656efb143b59)

fd4feb2a Multiple lore lines
This commit is contained in:
Lars Dormans 2018-12-12 15:18:24 +00:00
parent 985a0c0b11
commit d87a9966eb
2 changed files with 5 additions and 1 deletions

2
.gitignore vendored
View File

@ -10,3 +10,5 @@ target/
EpicHoppers-API/EpicHoppers-API\.iml EpicHoppers-API/EpicHoppers-API\.iml
EpicHoppers-Plugin/EpicHoppers-Plugin\.iml EpicHoppers-Plugin/EpicHoppers-Plugin\.iml
*.iml

View File

@ -492,7 +492,9 @@ public class EpicHoppersPlugin extends JavaPlugin implements EpicHoppers {
ItemMeta itemmeta = item.getItemMeta(); ItemMeta itemmeta = item.getItemMeta();
itemmeta.setDisplayName(TextComponent.formatText(Methods.formatName(level.getLevel(), true))); itemmeta.setDisplayName(TextComponent.formatText(Methods.formatName(level.getLevel(), true)));
String line = getLocale().getMessage("general.nametag.lore"); String line = getLocale().getMessage("general.nametag.lore");
if (!line.equals("")) itemmeta.setLore(Arrays.asList(line)); if (!line.equals("")) {
itemmeta.setLore(Arrays.asList(line.split("\n")));
}
item.setItemMeta(itemmeta); item.setItemMeta(itemmeta);
return item; return item;
} }