Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
matsu1213 committed Jun 20, 2024
1 parent 056ee10 commit 21025ef
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 21025ef

Please sign in to comment.