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
This commit is contained in:
parent
7539d3f9a4
commit
fc5d45d8c4
@ -66,7 +66,8 @@ public class Conf
|
|||||||
public static String allianceChatFormat = ChatColor.LIGHT_PURPLE+"%s:"+ChatColor.WHITE+" %s";
|
public static String allianceChatFormat = ChatColor.LIGHT_PURPLE+"%s:"+ChatColor.WHITE+" %s";
|
||||||
|
|
||||||
public static double autoLeaveAfterDaysOfInactivity = 10.0;
|
public static double autoLeaveAfterDaysOfInactivity = 10.0;
|
||||||
|
public static boolean removePlayerDataWhenBanned = true;
|
||||||
|
|
||||||
public static boolean worldGuardChecking = false;
|
public static boolean worldGuardChecking = false;
|
||||||
|
|
||||||
// server logging options
|
// server logging options
|
||||||
|
@ -175,11 +175,6 @@ public class FactionsPlayerListener extends PlayerListener
|
|||||||
@Override
|
@Override
|
||||||
public void onPlayerMove(PlayerMoveEvent event)
|
public void onPlayerMove(PlayerMoveEvent event)
|
||||||
{
|
{
|
||||||
// Did we change block?
|
|
||||||
if (event.getFrom().equals(event.getTo())
|
|
||||||
|| (event.getFrom().getBlockX() == event.getTo().getBlockX() && event.getFrom().getBlockZ() == event.getTo().getBlockZ())
|
|
||||||
) return;
|
|
||||||
|
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
FPlayer me = FPlayers.i.get(player);
|
FPlayer me = FPlayers.i.get(player);
|
||||||
|
|
||||||
@ -623,7 +618,7 @@ public class FactionsPlayerListener extends PlayerListener
|
|||||||
SpoutFeatures.playerDisconnect(badGuy);
|
SpoutFeatures.playerDisconnect(badGuy);
|
||||||
|
|
||||||
// if player was banned (not just kicked), get rid of their stored info
|
// 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);
|
badGuy.leave(false);
|
||||||
badGuy.markForDeletion(true);
|
badGuy.markForDeletion(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user