File tree 3 files changed +7
-1
lines changed
sealmenus-bukkit/src/main/java/com/focamacho/sealmenus/bukkit
sealmenus-sponge/src/main/java/com/focamacho/sealmenus/sponge
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
allprojects {
2
2
group = ' com.focamacho'
3
- version = ' 1.0.6 '
3
+ version = ' 1.0.7 '
4
4
}
5
5
6
6
subprojects {
Original file line number Diff line number Diff line change @@ -332,6 +332,9 @@ public void onClick(InventoryClickEvent ce) {
332
332
// Prevent inventory double clicks from stealing items from the menu
333
333
if (ce .getClick () == ClickType .DOUBLE_CLICK ) ce .setCancelled (true );
334
334
335
+ // Prevent Shift + Click from placing items inside the menu
336
+ if (ce .getClick () == ClickType .SHIFT_LEFT || ce .getClick () == ClickType .SHIFT_RIGHT ) ce .setCancelled (true );
337
+
335
338
int slot = ce .getSlot ();
336
339
if (slot < 9 * chestMenu .getRows ()) {
337
340
ce .setCancelled (true );
Original file line number Diff line number Diff line change @@ -201,6 +201,9 @@ public void update() {
201
201
// Prevent dragging items from placing items inside the menu
202
202
if (ce instanceof ClickInventoryEvent .Drag ) ce .setCancelled (true );
203
203
204
+ // Prevent Shift + Click from placing items inside the menu
205
+ if (ce instanceof ClickInventoryEvent .Shift ) ce .setCancelled (true );
206
+
204
207
// Prevent weird things from happening when sponge do not send the slot in the event
205
208
if (!ce .getSlot ().isPresent ()) {
206
209
ce .setCancelled (true );
You can’t perform that action at this time.
0 commit comments