mirror of
https://github.com/JamesPeters98/ChestsPlusPlus.git
synced 2025-01-24 17:21:41 +01:00
Hopper Event
Check if the event is cancelled by other plugin such as ChestShop, QuickShop, etc
This commit is contained in:
parent
cb99d7dcb3
commit
81e1d0f945
@ -35,6 +35,8 @@ public class HopperListener implements Listener {
|
||||
//TO HOPPER
|
||||
if(event.getDestination().getHolder() instanceof Hopper){
|
||||
if(event.getDestination().getLocation() != null){
|
||||
// If the event is cancelled by other plugin
|
||||
if(event.isCancelled()) return;
|
||||
if(event.getDestination().getLocation().getBlock().isBlockPowered()) return;
|
||||
}
|
||||
event.setCancelled(!HopperFilter.isInFilter(event.getDestination().getLocation().getBlock(),event.getItem()));
|
||||
|
Loading…
Reference in New Issue
Block a user