1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00
Fixes issue #948
This commit is contained in:
dniym 2019-08-19 01:00:55 -04:00 committed by GitHub
parent 21f2eb9793
commit 1625220b7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ public class BackpackListener implements Listener {
@EventHandler @EventHandler
public void onInteract(PlayerInteractEvent e) { public void onInteract(PlayerInteractEvent e) {
if (e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) { if (e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK) {
ItemStack item = e.getPlayer().getInventory().getItemInMainHand(); ItemStack item = e.getItem();
Player p = e.getPlayer(); Player p = e.getPlayer();
if (SlimefunManager.isItemSimiliar(item, SlimefunItems.BACKPACK_SMALL, false)) { if (SlimefunManager.isItemSimiliar(item, SlimefunItems.BACKPACK_SMALL, false)) {
e.setCancelled(true); e.setCancelled(true);