public class BanUtils extends Object
Constructor and Description |
---|
BanUtils() |
Modifier and Type | Method and Description |
---|---|
static BanResult |
banIfNeeded(NegativityPlayer player,
Cheat cheat,
int reliability)
Deprecated.
|
static BanResult |
banIfNeeded(NegativityPlayer player,
Cheat cheat,
int reliability,
long oldWarnAmount)
Basically common code for
SpigotNegativity#alertMod and SpongeNegativity#alertMod . |
static int |
computeBanDuration(NegativityPlayer player,
int reliability,
Cheat cheat) |
static void |
kickForBan(NegativityPlayer player,
Ban ban) |
static BanResult |
shouldBan(Cheat cheat,
NegativityPlayer np,
int relia)
Deprecated.
|
static BanResult |
shouldBan(Cheat cheat,
NegativityPlayer np,
int relia,
long oldWarnAmount)
Check if the given player should be banned for the given cheat
|
public static int computeBanDuration(NegativityPlayer player, int reliability, Cheat cheat)
public static BanResult shouldBan(Cheat cheat, NegativityPlayer np, int relia)
shouldBan(Cheat, NegativityPlayer, int, long)
cheat
- the cheat that can ban playernp
- the concerned playerrelia
- the reliability of the alertpublic static BanResult shouldBan(Cheat cheat, NegativityPlayer np, int relia, long oldWarnAmount)
cheat
- the cheat that can ban playernp
- the concerned playerrelia
- the reliability of the alertoldWarnAmount
- old warn of warn before adding some of thempublic static BanResult banIfNeeded(NegativityPlayer player, Cheat cheat, int reliability)
banIfNeeded(NegativityPlayer, Cheat, int, long)
SpigotNegativity#alertMod
and SpongeNegativity#alertMod
.player
- the player to ban if needcheat
- the cheat concerned by the try of needreliability
- the reliability of the cheatBanManager.executeBan(com.elikill58.negativity.universal.ban.Ban)
, null if banning was not neededpublic static BanResult banIfNeeded(NegativityPlayer player, Cheat cheat, int reliability, long oldWarnAmount)
SpigotNegativity#alertMod
and SpongeNegativity#alertMod
.player
- the player to ban if needcheat
- the cheat concerned by the try of needreliability
- the reliability of the cheatoldWarnAmount
- old warn of warn before adding some of themBanManager.executeBan(com.elikill58.negativity.universal.ban.Ban)
, null if banning was not neededpublic static void kickForBan(NegativityPlayer player, Ban ban)