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:
42
src/main/java/com/massivecraft/factions/struct/BanInfo.java
Normal file
42
src/main/java/com/massivecraft/factions/struct/BanInfo.java
Normal 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;
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ public enum Permission {
|
||||
ANNOUNCE("announce"),
|
||||
AUTOCLAIM("autoclaim"),
|
||||
AUTO_LEAVE_BYPASS("autoleavebypass"),
|
||||
BAN("ban"),
|
||||
BYPASS("bypass"),
|
||||
CHAT("chat"),
|
||||
CHATSPY("chatspy"),
|
||||
|
||||
Reference in New Issue
Block a user