1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Merge pull request #1016 from dniym/Backpack-Fix-948

Backpack fix 948
This commit is contained in:
TheBusyBiscuit 2019-08-19 09:53:07 +02:00 committed by GitHub
commit bfba42c3f3
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);