Added null-check for lore

master
Ruakij 4 years ago
parent 8889a16bdc
commit 4efa26fe0e

@ -152,9 +152,11 @@ public class LinkedBeaconTeleporterManager {
String serialiseBeaconItem(String name, List<String> lore){ String serialiseBeaconItem(String name, List<String> lore){
// get name and remove control-chars // get name and remove control-chars
String str = name.replace("\\", "\\\\"); String str = name.replace("\\", "\\\\");
for (String loreLine : lore) { if(lore != null){
// get lore-lines and remove control-chars for (String loreLine : lore) {
str += "\n"+ loreLine.replace("\\", "\\\\"); // get lore-lines and remove control-chars
str += "\n"+ loreLine.replace("\\", "\\\\");
}
} }
return str; return str;

Loading…
Cancel
Save