remove unused code

This commit is contained in:
destro174 2022-02-20 20:11:03 +01:00
parent dbd0a4f2b9
commit 708cc75d5b
2 changed files with 0 additions and 29 deletions

View File

@ -213,8 +213,6 @@ public class GriefPrevention extends JavaPlugin
public int config_ipLimit; //how many players can share an IP address
public boolean config_silenceBans; //whether to remove quit messages on banned players
public HashMap<String, Integer> config_seaLevelOverride; //override for sea level, because bukkit doesn't report the right value for all situations
public boolean config_limitTreeGrowth; //whether trees should be prevented from growing into a claim from outside
@ -223,7 +221,6 @@ public class GriefPrevention extends JavaPlugin
public boolean config_advanced_fixNegativeClaimblockAmounts; //whether to attempt to fix negative claim block amounts (some addons cause/assume players can go into negative amounts)
public int config_advanced_claim_expiration_check_rate; //How often GP should check for expired claims, amount in seconds
public int config_advanced_offlineplayer_cache_days; //Cache players who have logged in within the last x number of days
//custom log settings
public int config_logs_daysToKeep;
@ -245,12 +242,6 @@ public class GriefPrevention extends JavaPlugin
private HashMap<UUID, IgnoreClaimWarningTask> ignoreClaimWarningTasks;
//how far away to search from a tree trunk for its branch blocks
public static final int TREE_RADIUS = 5;
//how long to wait before deciding a player is staying online or staying offline, for notication messages
public static final int NOTIFICATION_SECONDS = 20;
//adds a server log entry
public static synchronized void AddLogEntry(String entry, CustomLogEntryTypes customLogType, boolean excludeFromServerLogs)
{
@ -595,7 +586,6 @@ public class GriefPrevention extends JavaPlugin
whisperCommandsToMonitor = config.getString("GriefPrevention.Spam.WhisperSlashCommands", whisperCommandsToMonitor);
this.config_ipLimit = config.getInt("GriefPrevention.MaxPlayersPerIpAddress", 3);
this.config_silenceBans = config.getBoolean("GriefPrevention.SilenceBans", true);
this.config_endermenMoveBlocks = config.getBoolean("GriefPrevention.EndermenMoveBlocks", false);
this.config_silverfishBreakBlocks = config.getBoolean("GriefPrevention.SilverfishBreakBlocks", false);
@ -649,7 +639,6 @@ public class GriefPrevention extends JavaPlugin
this.config_advanced_fixNegativeClaimblockAmounts = config.getBoolean("GriefPrevention.Advanced.fixNegativeClaimblockAmounts", true);
this.config_advanced_claim_expiration_check_rate = config.getInt("GriefPrevention.Advanced.ClaimExpirationCheckRate", 60);
this.config_advanced_offlineplayer_cache_days = config.getInt("GriefPrevention.Advanced.OfflinePlayer_cache_days", 90);
//custom logger settings
this.config_logs_daysToKeep = config.getInt("GriefPrevention.Abridged Logs.Days To Keep", 7);
@ -767,7 +756,6 @@ public class GriefPrevention extends JavaPlugin
outConfig.set("GriefPrevention.AdminsGetSignNotifications", this.config_signNotifications);
outConfig.set("GriefPrevention.MaxPlayersPerIpAddress", this.config_ipLimit);
outConfig.set("GriefPrevention.SilenceBans", this.config_silenceBans);
outConfig.set("GriefPrevention.Siege.DoorsOpenDelayInSeconds", this.config_siege_doorsOpenSeconds);
outConfig.set("GriefPrevention.Siege.CooldownEndInMinutes", this.config_siege_cooldownEndInMinutes);
@ -786,7 +774,6 @@ public class GriefPrevention extends JavaPlugin
outConfig.set("GriefPrevention.Advanced.fixNegativeClaimblockAmounts", this.config_advanced_fixNegativeClaimblockAmounts);
outConfig.set("GriefPrevention.Advanced.ClaimExpirationCheckRate", this.config_advanced_claim_expiration_check_rate);
outConfig.set("GriefPrevention.Advanced.OfflinePlayer_cache_days", this.config_advanced_offlineplayer_cache_days);
//custom logger settings
outConfig.set("GriefPrevention.Abridged Logs.Days To Keep", this.config_logs_daysToKeep);

View File

@ -395,7 +395,6 @@ class PlayerEventHandler implements Listener
Player player = event.getPlayer();
UUID playerID = player.getUniqueId();
PlayerData playerData = this.dataStore.getPlayerData(playerID);
boolean isBanned;
//If player is not trapped in a portal and has a pending rescue task, remove the associated metadata
//Why 9? No idea why, but this is decremented by 1 when the player disconnects.
@ -404,27 +403,12 @@ class PlayerEventHandler implements Listener
player.removeMetadata("GP_PORTALRESCUE", instance);
}
if (playerData.wasKicked)
{
isBanned = player.isBanned();
}
else
{
isBanned = false;
}
//silence notifications when they're coming too fast
if (event.getQuitMessage() != null && this.shouldSilenceNotification())
{
event.setQuitMessage(null);
}
//silence notifications when the player is banned
if (isBanned && instance.config_silenceBans)
{
event.setQuitMessage(null);
}
//make sure his data is all saved - he might have accrued some claim blocks while playing that were not saved immediately
else
{