From 21025efd323f3e4700ced863d488dacec3bf7d50 Mon Sep 17 00:00:00 2001 From: matsu1213 Date: Thu, 20 Jun 2024 21:56:32 +0900 Subject: [PATCH] fix error --- .../net/azisaba/leoncsaddon/CustomProjectileSizeListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/azisaba/leoncsaddon/CustomProjectileSizeListener.java b/src/main/java/net/azisaba/leoncsaddon/CustomProjectileSizeListener.java index 78d9481..d0d13bb 100644 --- a/src/main/java/net/azisaba/leoncsaddon/CustomProjectileSizeListener.java +++ b/src/main/java/net/azisaba/leoncsaddon/CustomProjectileSizeListener.java @@ -1,6 +1,7 @@ package net.azisaba.leoncsaddon; import com.shampaggon.crackshot.events.WeaponShootEvent; +import net.minecraft.server.v1_15_R1.Entity; import net.minecraft.server.v1_15_R1.EntityProjectile; import net.minecraft.server.v1_15_R1.EntitySize; import org.bukkit.craftbukkit.v1_15_R1.entity.CraftEntity; @@ -16,7 +17,7 @@ public class CustomProjectileSizeListener implements Listener { public void onShoot(WeaponShootEvent e){ WeaponConfigData data = LeonCSAddon.INSTANCE.getWeaponConfig().getWeaponConfigData(e.getWeaponTitle()); if(e.getProjectile() != null && data != null){ - EntityProjectile pj = ((CraftProjectile)e.getProjectile()).getHandle(); + Entity pj = ((CraftEntity)e.getProjectile()).getHandle(); try { Field f = pj.getClass().getDeclaredField("size"); f.setAccessible(true);