File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Essentials/src/main/java/com/earth2me/essentials Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -991,11 +991,19 @@ public void onInventoryDragEvent(final InventoryDragEvent event) {
991
991
if (!user .isInvSee ()) {
992
992
return ;
993
993
}
994
- if (event .getNewItems ().keySet ().stream ().anyMatch (slot -> slot > 35 )) {
995
- event .setCancelled (true );
994
+
995
+ for (int slot : event .getNewItems ().keySet ()) {
996
+ if (this .isBottomInventorySlot (slot )) {
997
+ event .setCancelled (true );
998
+ break ;
999
+ }
996
1000
}
997
1001
}
998
1002
1003
+ private boolean isBottomInventorySlot (int slot ) {
1004
+ return slot > 35 ;
1005
+ }
1006
+
999
1007
@ EventHandler (priority = EventPriority .MONITOR )
1000
1008
public void onInventoryCloseEvent (final InventoryCloseEvent event ) {
1001
1009
Player refreshPlayer = null ;
You can’t perform that action at this time.
0 commit comments