mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-12 05:53:53 +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:
@ -134,13 +134,11 @@ public class EventBlocker extends FreedomService
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void onEntityDamage(EntityDamageEvent event)
|
||||
{
|
||||
if (event.getCause() == EntityDamageEvent.DamageCause.LAVA)
|
||||
if ((event.getCause() == EntityDamageEvent.DamageCause.LAVA)
|
||||
&& !ConfigEntry.ALLOW_LAVA_DAMAGE.getBoolean())
|
||||
{
|
||||
if (!ConfigEntry.ALLOW_LAVA_DAMAGE.getBoolean())
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ConfigEntry.ENABLE_PET_PROTECT.getBoolean())
|
||||
|
Reference in New Issue
Block a user