mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-12-30 18:08:24 +01:00
Fixed InventoryMoveItemEvent still processing if both hopper & item transactions are disabled
This commit is contained in:
parent
3742e018c4
commit
a61df070e6
@ -316,6 +316,11 @@ public final class InventoryChangeListener extends Queue implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean hopperTransactions = Config.getConfig(location.getWorld()).HOPPER_TRANSACTIONS;
|
||||
if (!hopperTransactions && !Config.getConfig(location.getWorld()).ITEM_TRANSACTIONS) {
|
||||
return;
|
||||
}
|
||||
|
||||
InventoryHolder sourceHolder = PaperAdapter.ADAPTER.getHolder(event.getSource(), false);
|
||||
if (sourceHolder == null) {
|
||||
return;
|
||||
@ -326,7 +331,7 @@ public final class InventoryChangeListener extends Queue implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config.getConfig(location.getWorld()).HOPPER_TRANSACTIONS) {
|
||||
if (hopperTransactions) {
|
||||
if (Validate.isHopper(destinationHolder) && (Validate.isContainer(sourceHolder) && !Validate.isHopper(sourceHolder))) {
|
||||
HopperPullListener.processHopperPull(location, sourceHolder, destinationHolder, event.getItem());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user