Starting to rename fplayer --> uplayer since we will need an mplayer.

This commit is contained in:
Olof Larsson
2013-04-22 17:59:51 +02:00
parent e30c652759
commit 19f9834210
67 changed files with 407 additions and 411 deletions

View File

@@ -2,10 +2,10 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Perm;
import com.massivecraft.factions.Rel;
import com.massivecraft.factions.cmd.arg.ARFPlayer;
import com.massivecraft.factions.cmd.arg.ARUPlayer;
import com.massivecraft.factions.cmd.arg.ARFaction;
import com.massivecraft.factions.entity.FPlayer;
import com.massivecraft.factions.entity.FPlayerColls;
import com.massivecraft.factions.entity.UPlayer;
import com.massivecraft.factions.entity.UPlayerColls;
import com.massivecraft.factions.entity.Faction;
import com.massivecraft.factions.event.FactionsEventMembershipChange;
import com.massivecraft.factions.event.FactionsEventMembershipChange.MembershipChangeReason;
@@ -28,15 +28,15 @@ public class CmdFactionsLeader extends FCommand
@Override
public void perform()
{
FPlayer newLeader = this.arg(0, ARFPlayer.getStartAny(sender));
UPlayer newLeader = this.arg(0, ARUPlayer.getStartAny(sender));
if (newLeader == null) return;
Faction targetFaction = this.arg(1, ARFaction.get(sender), myFaction);
if (targetFaction == null) return;
FPlayer targetFactionCurrentLeader = targetFaction.getLeader();
UPlayer targetFactionCurrentLeader = targetFaction.getLeader();
// We now have fplayer and the target faction
// We now have uplayer and the target faction
if (this.senderIsConsole || fme.isUsingAdminMode() || Perm.LEADER_ANY.has(sender, false))
{
// Do whatever you wish
@@ -63,7 +63,7 @@ public class CmdFactionsLeader extends FCommand
}
}
// only perform a FPlayerJoinEvent when newLeader isn't actually in the faction
// only run event when newLeader isn't actually in the faction
if (newLeader.getFaction() != targetFaction)
{
FactionsEventMembershipChange event = new FactionsEventMembershipChange(sender, newLeader, targetFaction, MembershipChangeReason.LEADER);
@@ -90,9 +90,9 @@ public class CmdFactionsLeader extends FCommand
msg("<i>You have promoted %s<i> to the position of faction leader.", newLeader.describeTo(fme, true));
// Inform all players
for (FPlayer fplayer : FPlayerColls.get().get(sender).getAllOnline())
for (UPlayer uplayer : UPlayerColls.get().get(sender).getAllOnline())
{
fplayer.msg("%s<i> gave %s<i> the leadership of %s<i>.", senderIsConsole ? "A server admin" : RelationUtil.describeThatToMe(fme, fplayer, true), newLeader.describeTo(fplayer), targetFaction.describeTo(fplayer));
uplayer.msg("%s<i> gave %s<i> the leadership of %s<i>.", senderIsConsole ? "A server admin" : RelationUtil.describeThatToMe(fme, uplayer, true), newLeader.describeTo(uplayer), targetFaction.describeTo(uplayer));
}
}
}