From d87a9966eba9103be79248e2e6f4649ab716f600 Mon Sep 17 00:00:00 2001 From: Lars Dormans Date: Wed, 12 Dec 2018 15:18:24 +0000 Subject: [PATCH] Merge branch 'lore' into 'Legacy' Multiple lore lines See merge request Songoda/EpicHoppers!15 (cherry picked from commit e0eb80b92d1a48160e92592a23c0656efb143b59) fd4feb2a Multiple lore lines --- .gitignore | 2 ++ .../main/java/com/songoda/epichoppers/EpicHoppersPlugin.java | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5683aec..1d6910d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ target/ EpicHoppers-API/EpicHoppers-API\.iml EpicHoppers-Plugin/EpicHoppers-Plugin\.iml + +*.iml diff --git a/EpicHoppers-Plugin/src/main/java/com/songoda/epichoppers/EpicHoppersPlugin.java b/EpicHoppers-Plugin/src/main/java/com/songoda/epichoppers/EpicHoppersPlugin.java index bdf668a..50aaa22 100644 --- a/EpicHoppers-Plugin/src/main/java/com/songoda/epichoppers/EpicHoppersPlugin.java +++ b/EpicHoppers-Plugin/src/main/java/com/songoda/epichoppers/EpicHoppersPlugin.java @@ -492,7 +492,9 @@ public class EpicHoppersPlugin extends JavaPlugin implements EpicHoppers { ItemMeta itemmeta = item.getItemMeta(); itemmeta.setDisplayName(TextComponent.formatText(Methods.formatName(level.getLevel(), true))); 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); return item; }