From 8179fbca28efef0e11b715b57fa8ff24f006262d Mon Sep 17 00:00:00 2001 From: matsu1213 Date: Sun, 23 Jun 2024 11:33:52 +0900 Subject: [PATCH] shootlimitlandmine --- .../java/net/azisaba/leoncsaddon/WeaponShootLimitListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/azisaba/leoncsaddon/WeaponShootLimitListener.java b/src/main/java/net/azisaba/leoncsaddon/WeaponShootLimitListener.java index 0c11e2d..5ce5d85 100644 --- a/src/main/java/net/azisaba/leoncsaddon/WeaponShootLimitListener.java +++ b/src/main/java/net/azisaba/leoncsaddon/WeaponShootLimitListener.java @@ -38,7 +38,7 @@ public void onDrop(ItemSpawnEvent e){ if(e.getEntity().getPickupDelay() != 24000) return; for(Player player: e.getEntity().getWorld().getPlayers()){ - if(e.getEntity().getLocation().equals(player.getEyeLocation())){ + if(e.getEntity().getLocation().distanceSquared(player.getEyeLocation()) < 1){ WeaponConfigData data = LeonCSAddon.INSTANCE.getWeaponConfig().getWeaponConfigData(new CSUtility().getWeaponTitle(player.getInventory().getItemInMainHand())); if(data != null && !data.isMain){ for(int i = 0; i < 9; i++){