mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-06 06:41:44 +00:00
Update ItemLore.java
This commit is contained in:
@@ -328,9 +328,7 @@ public class ItemLore {
|
|||||||
// if it's disabled, don't update the stats
|
// if it's disabled, don't update the stats
|
||||||
// check to see if the item has the stats, remove them if it does
|
// check to see if the item has the stats, remove them if it does
|
||||||
if (!toolStats.configTools.checkConfig(clone.getType(), "blocks-mined")) {
|
if (!toolStats.configTools.checkConfig(clone.getType(), "blocks-mined")) {
|
||||||
toolStats.logger.info("config is disabled for item");
|
|
||||||
if (container.has(toolStats.blocksMined)) {
|
if (container.has(toolStats.blocksMined)) {
|
||||||
toolStats.logger.info("however, item has data!");
|
|
||||||
Integer blocksMined = container.get(toolStats.blocksMined, PersistentDataType.INTEGER);
|
Integer blocksMined = container.get(toolStats.blocksMined, PersistentDataType.INTEGER);
|
||||||
if (blocksMined == null) {
|
if (blocksMined == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -342,10 +340,8 @@ public class ItemLore {
|
|||||||
List<Component> newLore = removeLore(meta.lore(), lineToRemove);
|
List<Component> newLore = removeLore(meta.lore(), lineToRemove);
|
||||||
meta.lore(newLore);
|
meta.lore(newLore);
|
||||||
}
|
}
|
||||||
toolStats.logger.info("removed lore, returning: " + meta);
|
|
||||||
return meta;
|
return meta;
|
||||||
}
|
}
|
||||||
toolStats.logger.info("item did not have data, ignoring adding stats");
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user