mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-06 06:41:44 +00:00
possibly fix #44
This commit is contained in:
@@ -87,6 +87,11 @@ public class CreativeEvent implements Listener {
|
|||||||
Date finalDate = new Date(timeCreated);
|
Date finalDate = new Date(timeCreated);
|
||||||
PersistentDataContainer container = meta.getPersistentDataContainer();
|
PersistentDataContainer container = meta.getPersistentDataContainer();
|
||||||
|
|
||||||
|
// if the item already has an origin set, don't add it again
|
||||||
|
if (container.has(toolStats.originType, PersistentDataType.INTEGER)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// only make the hash if it's enabled
|
// only make the hash if it's enabled
|
||||||
if (toolStats.config.getBoolean("generate-hash-for-items")) {
|
if (toolStats.config.getBoolean("generate-hash-for-items")) {
|
||||||
String hash = toolStats.hashMaker.makeHash(spawnedItem.getType(), owner.getUniqueId(), timeCreated);
|
String hash = toolStats.hashMaker.makeHash(spawnedItem.getType(), owner.getUniqueId(), timeCreated);
|
||||||
|
|||||||
Reference in New Issue
Block a user