Merge branch 'master' of github.com:MassiveCraft/Factions
This commit is contained in:
commit
ea03124c31
@ -43,7 +43,7 @@ public class FPlayers extends PlayerEntityCollection<FPlayer>
|
|||||||
if ( ! Factions.i.exists(fplayer.getFactionId()))
|
if ( ! Factions.i.exists(fplayer.getFactionId()))
|
||||||
{
|
{
|
||||||
p.log("Reset faction data (invalid faction) for player "+fplayer.getName());
|
p.log("Reset faction data (invalid faction) for player "+fplayer.getName());
|
||||||
fplayer.resetFactionData();
|
fplayer.resetFactionData(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -62,16 +62,15 @@ public class FPlayers extends PlayerEntityCollection<FPlayer>
|
|||||||
{
|
{
|
||||||
if (now - fplayer.getLastLoginTime() > toleranceMillis)
|
if (now - fplayer.getLastLoginTime() > toleranceMillis)
|
||||||
{
|
{
|
||||||
// TODO: This stops the memory leak crashes but does not solve the issue: MEMBERS ARE NOT KICKED!!!
|
if (Conf.logFactionLeave || Conf.logFactionKick)
|
||||||
// TODO: DO SOMETHING ABOUT THIS
|
P.p.log("Player "+fplayer.getName()+" was auto-removed due to inactivity.");
|
||||||
/*if (Conf.logFactionLeave || Conf.logFactionKick)
|
|
||||||
P.p.log("Player "+fplayer.getName()+" was auto-removed due to inactivity.");*/
|
|
||||||
|
|
||||||
// if player is faction leader, sort out the faction since he's going away
|
// if player is faction leader, sort out the faction since he's going away
|
||||||
if (fplayer.getRole() == Rel.LEADER)
|
if (fplayer.getRole() == Rel.LEADER)
|
||||||
fplayer.getFaction().promoteNewLeader();
|
fplayer.getFaction().promoteNewLeader();
|
||||||
|
|
||||||
fplayer.leave(false);
|
fplayer.leave(false);
|
||||||
|
fplayer.detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -420,6 +420,7 @@ public class FactionsPlayerListener extends PlayerListener
|
|||||||
if (badGuy.getRole() == Rel.LEADER)
|
if (badGuy.getRole() == Rel.LEADER)
|
||||||
badGuy.getFaction().promoteNewLeader();
|
badGuy.getFaction().promoteNewLeader();
|
||||||
badGuy.leave(false);
|
badGuy.leave(false);
|
||||||
|
badGuy.detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user