mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-29 19:46:42 +00:00
Fixes for Codacy;
These fixes are designed to satisfy codacy. However, codacy reports a NPath Complexity of 649, whereas the current, recommended, and standardized threshold is 200. This is caused by FreedomCommand#execute(CommandSender, String, String[]);
This commit is contained in:
@ -324,14 +324,13 @@ public class ItemFun extends FreedomService
|
||||
{
|
||||
arrow = (Arrow)entity;
|
||||
}
|
||||
if (arrow != null && (arrow.getShooter() instanceof Player))
|
||||
//Redundant Player cast is required to avoid suspicious method calls.
|
||||
if (arrow != null
|
||||
&& (arrow.getShooter() instanceof Player)
|
||||
&& explosivePlayers.contains((Player)arrow.getShooter()))
|
||||
{
|
||||
//Redundant Player cast is required to avoid suspicious method calls.
|
||||
if (explosivePlayers.contains(arrow.getShooter()))
|
||||
{
|
||||
Objects.requireNonNull(arrow.getLocation().getWorld()).createExplosion(arrow.getLocation().getX(), arrow.getLocation().getY(), arrow.getLocation().getZ(), ConfigEntry.EXPLOSIVE_RADIUS.getDouble().floatValue(), false, ConfigEntry.ALLOW_EXPLOSIONS.getBoolean());
|
||||
arrow.remove();
|
||||
}
|
||||
Objects.requireNonNull(arrow.getLocation().getWorld()).createExplosion(arrow.getLocation().getX(), arrow.getLocation().getY(), arrow.getLocation().getZ(), ConfigEntry.EXPLOSIVE_RADIUS.getDouble().floatValue(), false, ConfigEntry.ALLOW_EXPLOSIONS.getBoolean());
|
||||
arrow.remove();
|
||||
}
|
||||
|
||||
if (entity instanceof Fireball)
|
||||
|
Reference in New Issue
Block a user