Config option on silencing ban messages (#1480)
Enabled by default as per previous behavior.
This commit is contained in:
parent
16036bdc19
commit
6382a9fee4
|
|
@ -206,6 +206,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
public int config_ipLimit; //how many players can share an IP address
|
||||
|
||||
public boolean config_trollFilterEnabled; //whether to auto-mute new players who use banned words right after joining
|
||||
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
|
||||
|
||||
|
|
@ -619,6 +620,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
this.config_smartBan = config.getBoolean("GriefPrevention.SmartBan", true);
|
||||
this.config_trollFilterEnabled = config.getBoolean("GriefPrevention.Mute New Players Using Banned Words", true);
|
||||
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);
|
||||
|
|
@ -871,6 +873,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
outConfig.set("GriefPrevention.SmartBan", this.config_smartBan);
|
||||
outConfig.set("GriefPrevention.Mute New Players Using Banned Words", this.config_trollFilterEnabled);
|
||||
outConfig.set("GriefPrevention.MaxPlayersPerIpAddress", this.config_ipLimit);
|
||||
outConfig.set("GriefPrevention.SilenceBans", this.config_silenceBans);
|
||||
|
||||
outConfig.set("GriefPrevention.Siege.Worlds", siegeEnabledWorldNames);
|
||||
outConfig.set("GriefPrevention.Siege.BreakableBlocks", breakableBlocksList);
|
||||
|
|
|
|||
|
|
@ -952,7 +952,7 @@ class PlayerEventHandler implements Listener
|
|||
}
|
||||
|
||||
//silence notifications when the player is banned
|
||||
if (isBanned)
|
||||
if (isBanned && instance.config_silenceBans)
|
||||
{
|
||||
event.setQuitMessage(null);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user