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:
Trent Hensler
2018-02-28 20:23:37 -08:00
parent cca207c1a5
commit 151d38fd7b
16 changed files with 360 additions and 12 deletions

View File

@@ -0,0 +1,42 @@
package com.massivecraft.factions.struct;
public class BanInfo {
// FPlayer IDs
private final String banner;
private final String banned;
private final long time;
public BanInfo(String banner, String banned, long time) {
this.banner = banner;
this.banned = banned;
this.time = time;
}
/**
* Get the FPlayer ID of the player who issued the ban.
*
* @return FPlayer ID.
*/
public String getBanner() {
return this.banner;
}
/**
* Get the FPlayer ID of the player who got banned.
*
* @return FPlayer ID.
*/
public String getBanned() {
return banned;
}
/**
* Get the server time when the ban was issued.
*
* @return system timestamp.
*/
public long getTime() {
return time;
}
}

View File

@@ -13,6 +13,7 @@ public enum Permission {
ANNOUNCE("announce"),
AUTOCLAIM("autoclaim"),
AUTO_LEAVE_BYPASS("autoleavebypass"),
BAN("ban"),
BYPASS("bypass"),
CHAT("chat"),
CHATSPY("chatspy"),