Fix issues in CmdOpen

A formatted message was missing a format argument, and comparison on
Strings was being performed with ==
This commit is contained in:
eueln 2014-11-02 01:08:32 -05:00
parent c5fc6fb07d
commit 99c582dda8

View File

@ -36,8 +36,8 @@ public class CmdOpen extends FCommand {
// Inform // Inform
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) { for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
if (fplayer.getFactionId() == myFaction.getId()) { if (fplayer.getFactionId().equals(myFaction.getId())) {
fplayer.msg("%s<i> changed the faction to <h>%s<i>.", open); fplayer.msg("%s<i> changed the faction to <h>%s<i>.", fme.getName(), open);
continue; continue;
} }
fplayer.msg("<i>The faction %s<i> is now %s", myFaction.getTag(fplayer.getFaction()), open); fplayer.msg("<i>The faction %s<i> is now %s", myFaction.getTag(fplayer.getFaction()), open);