This commit is contained in:
hyperdefined
2022-02-10 21:41:23 -05:00
parent 29e6c998cf
commit 77b1be62d4
11 changed files with 60 additions and 3 deletions

View File

@@ -84,6 +84,11 @@ public class GenerateLoot implements Listener {
long timeCreated = System.currentTimeMillis();
Date finalDate = new Date(timeCreated);
PersistentDataContainer container = meta.getPersistentDataContainer();
if (container.has(toolStats.timeCreated, PersistentDataType.LONG) || container.has(toolStats.genericOwner, PersistentDataType.LONG)) {
return null;
}
container.set(toolStats.timeCreated, PersistentDataType.LONG, timeCreated);
container.set(toolStats.genericOwner, new UUIDDataType(), owner.getUniqueId());