Removal of Lombok

Lombok implementation removal.

I have also gone through and replaced things with inline methods and variables, lambdas, and simplified loops down, removed unnecessary guard clauses, and overall cleaned up every single class. This took a long time, please do remember to follow proper naming conventions, don't include unnecessary guard clauses, follow exception rules and comment rules, and please PLEASE remember to use the DIAMOND OPERATOR rather than just inferring RAW TYPES!!!

Thank you!!
This commit is contained in:
Paldiu
2020-12-25 14:46:43 -05:00
parent 210b0f8b43
commit 5c0f77c7c5
170 changed files with 3302 additions and 2383 deletions

View File

@ -1,6 +1,6 @@
package me.totalfreedom.totalfreedommod.freeze;
import lombok.Getter;
import java.util.Objects;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
@ -17,7 +17,6 @@ public class FreezeData
private final FPlayer fPlayer;
//
@Getter
private Location location = null;
private BukkitTask unfreeze = null;
@ -36,7 +35,7 @@ public class FreezeData
final Player player = fPlayer.getPlayer();
if (player == null)
{
FLog.info("Could not freeze " + player.getName() + ". Player not online!");
FLog.info("Could not freeze that player as they are not online!");
return;
}
@ -62,13 +61,18 @@ public class FreezeData
@Override
public void run()
{
if (!plugin().al.isAdminImpostor(player) && plugin().pl.isPlayerImpostor(player))
if (!Objects.requireNonNull(plugin()).al.isAdminImpostor(player) && Objects.requireNonNull(plugin()).pl.isPlayerImpostor(player))
{
FUtil.adminAction("TotalFreedom", "Unfreezing " + player.getName(), false);
setFrozen(false);
}
}
}.runTaskLater(plugin(), AUTO_PURGE_TICKS);
}.runTaskLater(Objects.requireNonNull(plugin()), AUTO_PURGE_TICKS);
}
public Location getLocation()
{
return location;
}
}

View File

@ -1,6 +1,5 @@
package me.totalfreedom.totalfreedommod.freeze;
import lombok.Getter;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Location;
@ -12,7 +11,6 @@ import org.bukkit.event.player.PlayerMoveEvent;
public class Freezer extends FreedomService
{
@Getter
private boolean globalFreeze = false;
@Override
@ -26,11 +24,6 @@ public class Freezer extends FreedomService
{
}
public void setGlobalFreeze(boolean frozen)
{
this.globalFreeze = frozen;
}
public void purge()
{
this.globalFreeze = false;
@ -60,11 +53,17 @@ public class Freezer extends FreedomService
FUtil.setFlying(player, true);
Location loc = player.getLocation();
if (loc == null)
{
loc = event.getFrom();
}
event.setTo(loc);
}
public boolean isGlobalFreeze()
{
return globalFreeze;
}
public void setGlobalFreeze(boolean frozen)
{
this.globalFreeze = frozen;
}
}