Fix for error when deleting a faction if Vault wasn't present;

Fix for slashless Factions commands not working for player in faction chat or alliance chat modes
This commit is contained in:
Brettflan 2012-01-20 11:19:34 -06:00
parent 0209d69814
commit 1196d74140
2 changed files with 11 additions and 6 deletions

View File

@ -539,8 +539,6 @@ public class Faction extends Entity implements EconomyParticipator
Econ.setBalance(getAccountId(), 0);
}
this.getAccountId();
// Clean the board
Board.clean();

View File

@ -34,9 +34,17 @@ public class FactionsChatEarlyListener extends PlayerListener
String msg = event.getMessage();
FPlayer me = FPlayers.i.get(talkingPlayer);
ChatMode chat = me.getChatMode();
// slashless factions commands need to be handled here if the user isn't in public chat mode
if (chat != ChatMode.PUBLIC && p.handleCommand(event.getPlayer(), event.getMessage()))
{
event.setCancelled(true);
return;
}
// Is it a faction chat message?
if (me.getChatMode() == ChatMode.FACTION)
if (chat == ChatMode.FACTION)
{
Faction myFaction = me.getFaction();
@ -54,9 +62,8 @@ public class FactionsChatEarlyListener extends PlayerListener
event.setCancelled(true);
return;
}
else if (me.getChatMode() == ChatMode.ALLIANCE )
else if (chat == ChatMode.ALLIANCE)
{
Faction myFaction = me.getFaction();