a bit of cleanup

This commit is contained in:
Brettflan 2012-03-13 07:47:54 -05:00
parent a53a556594
commit 28269b7455
5 changed files with 18 additions and 19 deletions

View File

@ -79,13 +79,13 @@ public class CmdJoin extends FCommand
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
if (samePlayer && ! payForCommand(Conf.econCostJoin, "to join a faction", "for joining a faction")) return;
fme.msg("<i>%s successfully joined %s.", fplayer.describeTo(fme, true), faction.getTag(fme));
// trigger the join event (cancellable)
FPlayerJoinEvent joinEvent = new FPlayerJoinEvent(FPlayers.i.get(me),faction,FPlayerJoinEvent.PlayerJoinReason.COMMAND);
Bukkit.getServer().getPluginManager().callEvent(joinEvent);
if (joinEvent.isCancelled()) return;
fme.msg("<i>%s successfully joined %s.", fplayer.describeTo(fme, true), faction.getTag(fme));
if (!samePlayer)
fplayer.msg("<i>%s moved you into the faction %s.", fme.describeTo(fplayer, true), faction.getTag(fplayer));
faction.msg("<i>%s joined your faction.", fplayer.describeTo(faction, true));

View File

@ -68,7 +68,6 @@ public class CmdLeader extends FCommand
}
// only perform a FPlayerJoinEvent when newLeader isn't actually in the faction
// (only possibly triggered by console)
if (newLeader.getFaction() != targetFaction)
{
FPlayerJoinEvent event = new FPlayerJoinEvent(FPlayers.i.get(me),targetFaction,FPlayerJoinEvent.PlayerJoinReason.LEADER);