When a faction leader is kicked from his faction for whatever reason (not logging in for too long, a server admin running the /f kick command on him, the player being banned from server), another player will now be promoted to faction leader in his place. If the faction has at least one officer, one of them will be chosen. Otherwise, a normal member will be promoted. If the faction leader was the last/only member, the faction will of course be disbanded.
Also, players being kicked due to inactivity is now logged.
This commit is contained in:
@@ -462,6 +462,13 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
||||
public void leave(boolean makePay)
|
||||
{
|
||||
Faction myFaction = this.getFaction();
|
||||
|
||||
if (myFaction == null)
|
||||
{
|
||||
resetFactionData();
|
||||
return;
|
||||
}
|
||||
|
||||
boolean perm = myFaction.getFlag(FFlag.PERMANENT);
|
||||
|
||||
if (!perm && this.getRole() == Rel.LEADER && myFaction.getFPlayers().size() > 1)
|
||||
|
||||
Reference in New Issue
Block a user