mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-06 06:41:44 +00:00
Update CommandToolStats.java
This commit is contained in:
@@ -124,7 +124,7 @@ public class CommandToolStats implements TabExecutor {
|
|||||||
String caughtByLore = toolStats.getLoreFromConfig("fished.caught-by", false);
|
String caughtByLore = toolStats.getLoreFromConfig("fished.caught-by", false);
|
||||||
String lootedByLore = toolStats.getLoreFromConfig("looted.found-by", false);
|
String lootedByLore = toolStats.getLoreFromConfig("looted.found-by", false);
|
||||||
String tradedByLore = toolStats.getLoreFromConfig("traded.traded-by", false);
|
String tradedByLore = toolStats.getLoreFromConfig("traded.traded-by", false);
|
||||||
String spawnedByLore = toolStats.getLoreFromConfig("spawned.spawned-by", false);
|
String spawnedByLore = toolStats.getLoreFromConfig("spawned-in.spawned-by", false);
|
||||||
|
|
||||||
// make sure the config messages are not null
|
// make sure the config messages are not null
|
||||||
if (caughtByLore == null || lootedByLore == null || tradedByLore == null || spawnedByLore == null) {
|
if (caughtByLore == null || lootedByLore == null || tradedByLore == null || spawnedByLore == null) {
|
||||||
@@ -201,7 +201,7 @@ public class CommandToolStats implements TabExecutor {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 6: {
|
case 6: {
|
||||||
lore.add(toolStats.getLoreFromConfig("spawned.spawned-by", true).replace("{player}", ownerName));
|
lore.add(toolStats.getLoreFromConfig("spawned-in.spawned-by", true).replace("{player}", ownerName));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -234,7 +234,7 @@ public class CommandToolStats implements TabExecutor {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 6: {
|
case 6: {
|
||||||
lore.add(toolStats.getLoreFromConfig("spawned.spawned-on", true).replace("{date}", toolStats.numberFormat.formatDate(new Date(time))));
|
lore.add(toolStats.getLoreFromConfig("spawned-in.spawned-on", true).replace("{date}", toolStats.numberFormat.formatDate(new Date(time))));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -297,6 +297,14 @@ public class CommandToolStats implements TabExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (toolStats.config.getBoolean("enabled.arrows-shot")) {
|
||||||
|
if (container.has(toolStats.arrowsShot, PersistentDataType.INTEGER)) {
|
||||||
|
Integer arrows = container.get(toolStats.arrowsShot, PersistentDataType.INTEGER);
|
||||||
|
if (arrows != null) {
|
||||||
|
lore.add(toolStats.getLoreFromConfig("arrows-shot", true).replace("{arrows}", toolStats.numberFormat.formatInt(arrows)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
finalMeta.setLore(lore);
|
finalMeta.setLore(lore);
|
||||||
finalItem.setItemMeta(finalMeta);
|
finalItem.setItemMeta(finalMeta);
|
||||||
int slot = player.getInventory().getHeldItemSlot();
|
int slot = player.getInventory().getHeldItemSlot();
|
||||||
|
|||||||
Reference in New Issue
Block a user