Fix String-related bugs

The result of a call to String#toLowerCase() was ignored, and two
Strings were being compared with ==
This commit is contained in:
eueln 2015-01-06 11:42:56 -06:00
parent f411b4e014
commit 5799a0480b
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ public class CmdChat extends FCommand {
ChatMode modeTarget = fme.getChatMode().getNext();
if (modeString != null) {
modeString.toLowerCase();
modeString = modeString.toLowerCase();
if (modeString.startsWith("p")) {
modeTarget = ChatMode.PUBLIC;
} else if (modeString.startsWith("a")) {

View File

@ -65,7 +65,7 @@ public class CmdTag extends FCommand {
// Inform
for (FPlayer fplayer : FPlayers.getInstance().getOnlinePlayers()) {
if (fplayer.getFactionId() == myFaction.getId()) {
if (fplayer.getFactionId().equals(myFaction.getId())) {
fplayer.msg(TL.COMMAND_TAG_FACTION, fme.describeTo(myFaction, true), myFaction.getTag(myFaction));
continue;
}