Package net.deechael.dynamichat.api
Interface BanIPManager
public interface BanIPManager
Ban or unban the ip
-
Method Summary
Modifier and TypeMethodDescriptionBan the hostBan the hostbanIPWithPlayer(PlayerUser user, String operator, String reason, Date start, Date end) Ban the host connected with the playerGet the punishment by idGet all banned hostGet all player name which is connected with a banned hostnet.deechael.useless.objs.DuObj<Boolean,BanIPPunishment> getCurrent(String host) To get the current punishment of the hostnet.deechael.useless.objs.DuObj<Boolean,BanIPPunishment> getCurrentWithPlayer(String playerName) To get the current punishment of the host connected with the playergetPunishments(String host) Get the punishments of a hostgetPunishmentsWithPlayer(String playerName) Get the punishments of a host connected with the playerbooleanTo check whether the host is bannedbooleanisBannedWithPlayer(String playerName) To check whether the host connected with the player is bannedbooleanisBannedWithPlayer(PlayerUser user) To check whether the host connected with the player is bannedvoidUnban the host by hostvoidunbanIP(InetSocketAddress address) Unban the host by hostvoidunbanIPWithId(String id) Unban the host by the id of punishmentvoidunbanIPWithPlayer(String playerName) Unban the host connected with the playervoidunbanIPWithPlayer(UUID uuid) Unban the host connected with the player
-
Method Details
-
getBanned
Get all banned host- Returns:
- hosts (Unbanned not included)
-
getBannedWithPlayer
Get all player name which is connected with a banned host- Returns:
- player names (Lowercase)
-
getPunishments
Get the punishments of a host- Parameters:
host- the owner of punishments- Returns:
- all punishments including unbanned
-
getPunishmentsWithPlayer
Get the punishments of a host connected with the player- Parameters:
playerName- the player name connected to the owner of punishments- Returns:
- all punishments including unbanned
-
getCurrent
To get the current punishment of the host- Parameters:
host- the owner of punishments- Returns:
- if host not banned, return (false, null), else return (true, BanIPPunishment)
-
getCurrentWithPlayer
To get the current punishment of the host connected with the player- Parameters:
playerName- the player name connected to the owner of punishments- Returns:
- if host not banned, return (false, null), else return (true, BanIPPunishment)
-
isBanned
To check whether the host is banned- Parameters:
host- the owner of punishments- Returns:
- the banned status
-
isBannedWithPlayer
To check whether the host connected with the player is banned- Parameters:
user- the user connected with the owner of punishments- Returns:
- the banned status
-
isBannedWithPlayer
To check whether the host connected with the player is banned- Parameters:
playerName- the user connected with the owner of punishments- Returns:
- the banned status
-
get
Get the punishment by id- Parameters:
banId- the id of punishment- Returns:
- if id not exists, return null, else BanIPPunishment
-
banIP
Ban the host- Parameters:
host- the host to be bannedoperator- the operator, should be the name of a player or "CONSOLE"reason- the reason why ban the playerstart- the start time, should be new Date()end- the end time, if is null, means forever- Returns:
- the punishment object
-
banIP
BanIPPunishment banIP(InetSocketAddress address, String operator, String reason, Date start, Date end) Ban the host- Parameters:
address- the host to be bannedoperator- the operator, should be the name of a player or "CONSOLE"reason- the reason why ban the playerstart- the start time, should be new Date()end- the end time, if is null, means forever- Returns:
- the punishment object
-
banIPWithPlayer
BanIPPunishment banIPWithPlayer(PlayerUser user, String operator, String reason, Date start, Date end) Ban the host connected with the player- Parameters:
user- the player connected with the hostoperator- the operator, should be the name of a player or "CONSOLE"reason- the reason why ban the playerstart- the start time, should be new Date()end- the end time, if is null, means forever- Returns:
- the punishment object
-
unbanIPWithId
Unban the host by the id of punishment- Parameters:
id- the id of punishment
-
unbanIP
Unban the host by host- Parameters:
host- the host to be unbanned
-
unbanIP
Unban the host by host- Parameters:
address- the host to be unbanned
-
unbanIPWithPlayer
Unban the host connected with the player- Parameters:
uuid- the player connected with the host
-
unbanIPWithPlayer
Unban the host connected with the player- Parameters:
playerName- the player connected with the host
-