Added logging and rollback support for players crafting items

This commit is contained in:
Intelli 2022-02-24 19:52:19 -07:00
parent 30c1921968
commit 5494bce0fc
8 changed files with 195 additions and 5 deletions

View file

@ -18,7 +18,7 @@ class ItemTransactionProcess extends Queue {
if (ConfigHandler.loggingItem.get(loggingItemId) != null) {
int current_chest = ConfigHandler.loggingItem.get(loggingItemId);
if (ConfigHandler.itemsPickup.get(loggingItemId) == null && ConfigHandler.itemsDrop.get(loggingItemId) == null && ConfigHandler.itemsThrown.get(loggingItemId) == null && ConfigHandler.itemsShot.get(loggingItemId) == null) {
if (ConfigHandler.itemsPickup.get(loggingItemId) == null && ConfigHandler.itemsDrop.get(loggingItemId) == null && ConfigHandler.itemsThrown.get(loggingItemId) == null && ConfigHandler.itemsShot.get(loggingItemId) == null && ConfigHandler.itemsBreak.get(loggingItemId) == null && ConfigHandler.itemsDestroy.get(loggingItemId) == null && ConfigHandler.itemsCreate.get(loggingItemId) == null) {
return;
}
if (current_chest == forceData) {
@ -29,6 +29,9 @@ class ItemTransactionProcess extends Queue {
ConfigHandler.itemsDrop.remove(loggingItemId);
ConfigHandler.itemsThrown.remove(loggingItemId);
ConfigHandler.itemsShot.remove(loggingItemId);
ConfigHandler.itemsBreak.remove(loggingItemId);
ConfigHandler.itemsDestroy.remove(loggingItemId);
ConfigHandler.itemsCreate.remove(loggingItemId);
ConfigHandler.loggingItem.remove(loggingItemId);
}
else {