From 71c8f8171ba3c4ad0f345657f42296d34fc10983 Mon Sep 17 00:00:00 2001 From: LoJoSho Date: Sun, 9 Apr 2023 11:08:40 -0500 Subject: [PATCH] fix: Standing does not readd backpack --- .../hmccosmetics/listener/PlayerGameListener.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/listener/PlayerGameListener.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/listener/PlayerGameListener.java index 1157ceb5..3e8be70e 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/listener/PlayerGameListener.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/listener/PlayerGameListener.java @@ -201,10 +201,12 @@ public class PlayerGameListener implements Listener { if (pose.equals(Pose.STANDING)) { // #84, Riptides mess with backpacks ItemStack currentItem = player.getInventory().getItemInMainHand(); - if (currentItem == null) return; - if (!currentItem.hasItemMeta()) return; - if (currentItem.containsEnchantment(Enchantment.RIPTIDE)) { - return; + if (currentItem != null) { + if (currentItem.hasItemMeta()) { + if (currentItem.containsEnchantment(Enchantment.RIPTIDE)) { + return; + } + } } if (!user.isBackpackSpawned()) {