Aggressive debloat

- Removes unused Logviewer functionality
- Removes several unused bits of code from FPlayer
- Changes the build configuration to not shade in org.apache.commons:commons-lang3, commons-io.commons-io,
  jetbrains.annotation, and org.javassist:javassist, opting instead to load them in on runtime using a
  little-known Spigot trick
This commit is contained in:
Video
2022-11-21 07:09:59 -07:00
parent 99a5897d44
commit b3e1a8b528
11 changed files with 6 additions and 519 deletions

View File

@ -20,10 +20,8 @@ import java.util.UUID;
public class FPlayer
{
public static final long AUTO_PURGE_TICKS = 5L * 60L * 20L;
private final TotalFreedomMod plugin;
private final String name;
@ -40,8 +38,6 @@ public class FPlayer
private int messageCount = 0;
private int totalBlockDestroy = 0;
private int totalBlockPlace = 0;
private int freecamDestroyCount = 0;
private int freecamPlaceCount = 0;
private boolean isOrbiting = false;
private double orbitStrength = 10.0;
private boolean mobThrowerEnabled = false;
@ -52,11 +48,9 @@ public class FPlayer
private boolean mp44Firing = false;
private BukkitTask lockupScheduleTask = null;
private boolean lockedUp = false;
private String lastMessage = "";
private boolean inAdminchat = false;
private boolean allCommandsBlocked = false;
private String lastCommand = "";
private boolean cmdspyEnabled = false;
private String tag = null;
private int warningCount = 0;
@ -82,11 +76,6 @@ public class FPlayer
this.ip = ip;
}
public static long getAutoPurgeTicks()
{
return AUTO_PURGE_TICKS;
}
public Player getPlayer()
{
if (player != null && !player.isOnline())
@ -110,7 +99,6 @@ public class FPlayer
// Ensure admins don't have admin functionality when removed (FS-222)
public void removeAdminFunctionality()
{
this.setCommandSpy(false);
this.setAdminChat(false);
this.setFuckoffRadius(0);
}
@ -120,11 +108,6 @@ public class FPlayer
return isOrbiting;
}
public void setOrbiting(boolean orbiting)
{
isOrbiting = orbiting;
}
public void startOrbiting(double strength)
{
this.isOrbiting = true;
@ -186,26 +169,6 @@ public class FPlayer
this.totalBlockPlace = 0;
}
public int incrementAndGetFreecamDestroyCount()
{
return this.freecamDestroyCount++;
}
public void resetFreecamDestroyCount()
{
this.freecamDestroyCount = 0;
}
public int incrementAndGetFreecamPlaceCount()
{
return this.freecamPlaceCount++;
}
public void resetFreecamPlaceCount()
{
this.freecamPlaceCount = 0;
}
public void enableMobThrower(EntityType mobThrowerCreature, double mobThrowerSpeed)
{
this.mobThrowerEnabled = true;
@ -350,16 +313,6 @@ public class FPlayer
this.lockedUp = lockedUp;
}
public String getLastMessage()
{
return lastMessage;
}
public void setLastMessage(String message)
{
this.lastMessage = message;
}
public void setAdminChat(boolean inAdminchat)
{
this.inAdminchat = inAdminchat;
@ -390,16 +343,6 @@ public class FPlayer
this.lastCommand = lastCommand;
}
public void setCommandSpy(boolean enabled)
{
this.cmdspyEnabled = enabled;
}
public boolean cmdspyEnabled()
{
return cmdspyEnabled;
}
public String getTag()
{
return this.tag;
@ -417,16 +360,6 @@ public class FPlayer
}
}
public int getWarningCount()
{
return this.warningCount;
}
public void setWarningCount(int warningCount)
{
this.warningCount = warningCount;
}
public void incrementWarnings(boolean quiet)
{
this.warningCount++;
@ -459,16 +392,6 @@ public class FPlayer
return ip;
}
public BukkitTask getUnmuteTask()
{
return unmuteTask;
}
public void setUnmuteTask(BukkitTask unmuteTask)
{
this.unmuteTask = unmuteTask;
}
public FreezeData getFreezeData()
{
return freezeData;
@ -484,176 +407,11 @@ public class FPlayer
this.fuckoffRadius = fuckoffRadius;
}
public int getMessageCount()
{
return messageCount;
}
public void setMessageCount(int messageCount)
{
this.messageCount = messageCount;
}
public int getTotalBlockDestroy()
{
return totalBlockDestroy;
}
public void setTotalBlockDestroy(int totalBlockDestroy)
{
this.totalBlockDestroy = totalBlockDestroy;
}
public int getTotalBlockPlace()
{
return totalBlockPlace;
}
public void setTotalBlockPlace(int totalBlockPlace)
{
this.totalBlockPlace = totalBlockPlace;
}
public int getFreecamDestroyCount()
{
return freecamDestroyCount;
}
public void setFreecamDestroyCount(int freecamDestroyCount)
{
this.freecamDestroyCount = freecamDestroyCount;
}
public int getFreecamPlaceCount()
{
return freecamPlaceCount;
}
public void setFreecamPlaceCount(int freecamPlaceCount)
{
this.freecamPlaceCount = freecamPlaceCount;
}
public CageData getCageData()
{
return cageData;
}
public double getOrbitStrength()
{
return orbitStrength;
}
public void setOrbitStrength(double orbitStrength)
{
this.orbitStrength = orbitStrength;
}
public boolean isMobThrowerEnabled()
{
return mobThrowerEnabled;
}
public void setMobThrowerEnabled(boolean mobThrowerEnabled)
{
this.mobThrowerEnabled = mobThrowerEnabled;
}
public EntityType getMobThrowerEntity()
{
return mobThrowerEntity;
}
public void setMobThrowerEntity(EntityType mobThrowerEntity)
{
this.mobThrowerEntity = mobThrowerEntity;
}
public double getMobThrowerSpeed()
{
return mobThrowerSpeed;
}
public void setMobThrowerSpeed(double mobThrowerSpeed)
{
this.mobThrowerSpeed = mobThrowerSpeed;
}
public List<LivingEntity> getMobThrowerQueue()
{
return mobThrowerQueue;
}
public BukkitTask getMp44ScheduleTask()
{
return mp44ScheduleTask;
}
public void setMp44ScheduleTask(BukkitTask mp44ScheduleTask)
{
this.mp44ScheduleTask = mp44ScheduleTask;
}
public boolean isMp44Armed()
{
return mp44Armed;
}
public void setMp44Armed(boolean mp44Armed)
{
this.mp44Armed = mp44Armed;
}
public boolean isMp44Firing()
{
return mp44Firing;
}
public void setMp44Firing(boolean mp44Firing)
{
this.mp44Firing = mp44Firing;
}
public BukkitTask getLockupScheduleTask()
{
return lockupScheduleTask;
}
public void setLockupScheduleTask(BukkitTask lockupScheduleTask)
{
this.lockupScheduleTask = lockupScheduleTask;
}
public boolean isInAdminchat()
{
return inAdminchat;
}
public void setInAdminchat(boolean inAdminchat)
{
this.inAdminchat = inAdminchat;
}
public boolean isAllCommandsBlocked()
{
return allCommandsBlocked;
}
public void setAllCommandsBlocked(boolean allCommandsBlocked)
{
this.allCommandsBlocked = allCommandsBlocked;
}
public boolean isCmdspyEnabled()
{
return cmdspyEnabled;
}
public void setCmdspyEnabled(boolean cmdspyEnabled)
{
this.cmdspyEnabled = cmdspyEnabled;
}
public boolean isEditBlocked()
{
return editBlocked;