mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-11-14 10:45:23 +01:00
Prevent players from using the offhand swap key to move the backpack item (fixes #162)
This commit is contained in:
parent
c0002f75a5
commit
28796ef0f7
@ -262,6 +262,14 @@ else if((event.getAction() == InventoryAction.HOTBAR_MOVE_AND_READD || event.get
|
|||||||
messageDoNotRemoveItem.send(player);
|
messageDoNotRemoveItem.send(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if((event.getAction() == InventoryAction.HOTBAR_MOVE_AND_READD || event.getAction() == InventoryAction.HOTBAR_SWAP) && event.getClick().name().equals("SWAP_OFFHAND"))
|
||||||
|
{
|
||||||
|
if(isItemShortcut(player.getInventory().getItemInOffHand()))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
messageDoNotRemoveItem.send(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
else if(isItemShortcut(event.getCursor()))
|
else if(isItemShortcut(event.getCursor()))
|
||||||
{
|
{
|
||||||
if(!player.getInventory().equals(event.getClickedInventory()))
|
if(!player.getInventory().equals(event.getClickedInventory()))
|
||||||
|
2
pom.xml
2
pom.xml
@ -7,7 +7,7 @@
|
|||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>2.3.23</revision>
|
<revision>2.3.24</revision>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
|
Loading…
Reference in New Issue
Block a user