mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2026-02-01 18:21:04 +00:00
return item lore back rather than nulling it
This commit is contained in:
@@ -249,11 +249,6 @@ public class EntityDamage implements Listener {
|
||||
String playerKillsFormatted = toolStats.numberFormat.formatInt(playerKills);
|
||||
List<String> newLore = toolStats.itemLore.addItemLore(meta, "{kills}", playerKillsFormatted, "kills.player");
|
||||
|
||||
// if the list returned null, don't add it
|
||||
if (newLore == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// do we add the lore based on the config?
|
||||
if (toolStats.checkConfig(itemStack, "player-kills")) {
|
||||
meta.setLore(newLore);
|
||||
@@ -289,11 +284,6 @@ public class EntityDamage implements Listener {
|
||||
String mobKillsFormatted = toolStats.numberFormat.formatInt(mobKills);
|
||||
List<String> newLore = toolStats.itemLore.addItemLore(meta, "{kills}", mobKillsFormatted, "kills.mob");
|
||||
|
||||
// if the list returned null, don't add it
|
||||
if (newLore == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// do we add the lore based on the config?
|
||||
if (toolStats.checkConfig(itemStack, "mob-kills")) {
|
||||
meta.setLore(newLore);
|
||||
@@ -330,11 +320,6 @@ public class EntityDamage implements Listener {
|
||||
String damageTakenFormatted = toolStats.numberFormat.formatDouble(damageTaken);
|
||||
List<String> newLore = toolStats.itemLore.addItemLore(meta, "{damage}", damageTakenFormatted, "damage-taken");
|
||||
|
||||
// if the list returned null, don't add it
|
||||
if (newLore == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (toolStats.config.getBoolean("enabled.armor-damage")) {
|
||||
meta.setLore(newLore);
|
||||
}
|
||||
@@ -370,11 +355,6 @@ public class EntityDamage implements Listener {
|
||||
String mobKillsFormatted = toolStats.numberFormat.formatInt(mobKills);
|
||||
List<String> newLore = toolStats.itemLore.addItemLore(meta, "{kills}", mobKillsFormatted, "kills.mob");
|
||||
|
||||
// if the list returned null, don't add it
|
||||
if (newLore == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// do we add the lore based on the config?
|
||||
if (toolStats.checkConfig(newTrident, "mob-kills")) {
|
||||
meta.setLore(newLore);
|
||||
@@ -412,11 +392,6 @@ public class EntityDamage implements Listener {
|
||||
String playerKillsFormatted = toolStats.numberFormat.formatInt(playerKills);
|
||||
List<String> newLore = toolStats.itemLore.addItemLore(meta, "{kills}", playerKillsFormatted, "kills.player");
|
||||
|
||||
// if the list returned null, don't add it
|
||||
if (newLore == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// do we add the lore based on the config?
|
||||
if (toolStats.checkConfig(newTrident, "player-kills")) {
|
||||
meta.setLore(newLore);
|
||||
|
||||
Reference in New Issue
Block a user