Faction Bans
Adds /f ban, /f unban, and /f banlist Permission: factions.ban - included with factions.kithalfplayer Also added as a /f perm that can be granted. Otherwise, defaults to faction mods. Number of bans now shows up in f show Banning a player will notify your faction and target player. It'll also kick the player from your faction if they are currently in it. TODO: make /f banlist prettier
This commit is contained in:
@@ -79,6 +79,12 @@ public class CmdJoin extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check for ban
|
||||
if (!fme.isAdminBypassing() && faction.isBanned(fme)) {
|
||||
fme.msg(TL.COMMAND_JOIN_BANNED, faction.getTag(fme));
|
||||
return;
|
||||
}
|
||||
|
||||
// trigger the join event (cancellable)
|
||||
FPlayerJoinEvent joinEvent = new FPlayerJoinEvent(FPlayers.getInstance().getByPlayer(me), faction, FPlayerJoinEvent.PlayerJoinReason.COMMAND);
|
||||
Bukkit.getServer().getPluginManager().callEvent(joinEvent);
|
||||
|
||||
Reference in New Issue
Block a user