mirror of
https://github.com/JamesPeters98/ChestsPlusPlus.git
synced 2024-11-14 06:36:28 +01:00
Merge pull request #44 from LegameMc/hopper-event
Hopper Event - Check if the event is cancelled by other plugin such as ChestShop, QuickShop, etc
This commit is contained in:
commit
115c9c2912
@ -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