From accf718120d46f1f1881ca613c97afa5f6cb3801 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sun, 18 Dec 2011 02:37:40 -0600 Subject: [PATCH] New conf.json setting "removePlayerDataWhenBanned" (default true), which can be disabled to prevent Factions from deleting player data for players when they are banned from the server --- src/com/massivecraft/factions/Conf.java | 3 ++- .../factions/listeners/FactionsPlayerListener.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/factions/Conf.java b/src/com/massivecraft/factions/Conf.java index 5e957fc7..f813a811 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -75,7 +75,8 @@ public class Conf public static String allianceChatFormat = ChatColor.LIGHT_PURPLE+"%s:"+ChatColor.WHITE+" %s"; public static double autoLeaveAfterDaysOfInactivity = 10.0; - + public static boolean removePlayerDataWhenBanned = true; + public static boolean worldGuardChecking = false; // server logging options diff --git a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java index d528312e..18203a57 100644 --- a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -416,7 +416,7 @@ public class FactionsPlayerListener extends PlayerListener SpoutFeatures.playerDisconnect(badGuy); // if player was banned (not just kicked), get rid of their stored info - if (event.getReason().equals("Banned by admin.")) + if (Conf.removePlayerDataWhenBanned && event.getReason().equals("Banned by admin.")) { badGuy.leave(false); }