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:
parent
0209d69814
commit
1196d74140
@ -539,8 +539,6 @@ public class Faction extends Entity implements EconomyParticipator
|
|||||||
Econ.setBalance(getAccountId(), 0);
|
Econ.setBalance(getAccountId(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getAccountId();
|
|
||||||
|
|
||||||
// Clean the board
|
// Clean the board
|
||||||
Board.clean();
|
Board.clean();
|
||||||
|
|
||||||
|
@ -34,9 +34,17 @@ public class FactionsChatEarlyListener extends PlayerListener
|
|||||||
String msg = event.getMessage();
|
String msg = event.getMessage();
|
||||||
|
|
||||||
FPlayer me = FPlayers.i.get(talkingPlayer);
|
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?
|
// Is it a faction chat message?
|
||||||
if (me.getChatMode() == ChatMode.FACTION)
|
if (chat == ChatMode.FACTION)
|
||||||
{
|
{
|
||||||
Faction myFaction = me.getFaction();
|
Faction myFaction = me.getFaction();
|
||||||
|
|
||||||
@ -54,9 +62,8 @@ public class FactionsChatEarlyListener extends PlayerListener
|
|||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (me.getChatMode() == ChatMode.ALLIANCE )
|
else if (chat == ChatMode.ALLIANCE)
|
||||||
{
|
{
|
||||||
Faction myFaction = me.getFaction();
|
Faction myFaction = me.getFaction();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user