Merge branch 'loreTorch' into 'Legacy'

Added ability to set a lore message for the farming item

See merge request Songoda/EpicFarming!10

(cherry picked from commit 33c2d66e227aa2c8fc79c48a11840de54f7aafcd)

2b0eb9e0 Added ability to set a lore message for the farming item
This commit is contained in:
Lars Dormans 2018-12-06 20:39:28 +00:00
parent 0467606d83
commit 545297bc4c
3 changed files with 8 additions and 0 deletions

4
.gitignore vendored
View File

@ -10,3 +10,7 @@ EpicFarming\.iml
EpicFarming-API/src/main/EpicFarming-API\.iml
EpicFarming-Plugin/src/main/EpicFarming-Plugin\.iml
EpicFarming-Parent\.iml
*.iml

View File

@ -54,6 +54,7 @@ import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.function.Supplier;
@ -442,6 +443,8 @@ public class EpicFarmingPlugin extends JavaPlugin implements EpicFarming {
ItemStack item = new ItemStack(Material.valueOf(EpicFarmingPlugin.getInstance().getConfig().getString("Main.Farm Block Material")), 1);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(Arconix.pl().getApi().format().formatText(Methods.formatName(level.getLevel(), true)));
String line = getLocale().getMessage("general.nametag.lore");
if (!line.equals("")) meta.setLore(Arrays.asList(line));
item.setItemMeta(meta);
return item;
}

View File

@ -2,6 +2,7 @@
general.nametag.prefix = "&8[&6EpicFarming&8]"
general.nametag.farm = "&eLevel %level% &fFarm"
general.nametag.lore = ""
#Interface Messages