Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
matsu1213 committed Jun 19, 2024
1 parent e90e375 commit fb39680
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ 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();
Field f = pj.getClass().getDeclaredField("size");
f.setAccessible(true);
f.set(pj, new EntitySize((float)data.projectileSizeXZ, (float)data.projectileSizeY, false));
try {
Field f = pj.getClass().getDeclaredField("size");
f.setAccessible(true);
f.set(pj, new EntitySize((float) data.projectileSizeXZ, (float) data.projectileSizeY, false));
}catch (Exception ex){
ex.printStackTrace();
}
}
}

Expand Down

0 comments on commit fb39680

Please sign in to comment.