Class BanwaveEntry
BanwaveManager
.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]
Array containing all available placeholders that can be translated with a banwave entry's information. -
Method Summary
Modifier and TypeMethodDescriptionabstract String
formatPlaceholders
(String input, Language language) Translates an input string with this entry's specific placeholders.formatPlaceholders
(List<String> input, Language language) Translates an input string list with this entry's specific placeholders.long
getDate()
Gets this entry's creation or modification date, in milliseconds.long
Gets this entry's duration, in milliseconds.Gets this entry's IP address.Gets this entry's player.Gets this entry's reason.long
Gets this entry's removal's date, in milliseconds.Gets this entry's origin server.Gets who punished the player.getType()
Gets this entry's type.Gets who removed the entry.boolean
isGlobal()
Checks if this entry affects all servers inside of the network.boolean
isSilent()
Checks if this entry is silent.void
setDate
(long date) Sets this entry's modification date.void
setDuration
(long duration) Sets this entry's duration, in milliseconds.void
setGlobal
(boolean global) Sets if this entry should affect all servers inside of the network.void
Sets this entry's reason.void
setRemovalDate
(long removalDate) Sets this entry's removal's date, in milliseconds.void
Sets this entry's origin server.void
setSilent
(boolean silent) Sets if this entry should be silent.void
setStaffMember
(String staffMember) Sets who punished the player.void
setWhoRemoved
(String whoRemoved) Sets who removed the entry.
-
Field Details
-
PLACEHOLDERS
Array containing all available placeholders that can be translated with a banwave entry's information.Content: ["player", "player_uuid", "ip_address", "staff_member", "who_removed", "reason", "server", "type", "date", "removal_date", "duration", "active", "global", "silent"]
- See Also:
-
-
Method Details
-
getPlayer
Gets this entry's player.Will return
null
if they have not been specified (BanType.IP_ADDRESS
with no given player).- Returns:
- Entry's player
-
getIPAddress
Gets this entry's IP address.Will return
null
if the IP address is unknown.- Returns:
- Entry's IP address
-
getStaffMember
Gets who punished the player.- Returns:
- Entry's staff member
-
setStaffMember
Sets who punished the player.- Parameters:
staffMember
- Entry's staff member
-
getWhoRemoved
Gets who removed the entry.Will return
null
if the entry has not been removed.- Returns:
- Who removed the entry
-
setWhoRemoved
Sets who removed the entry.- Parameters:
whoRemoved
- Who removed the entry
-
getReason
Gets this entry's reason.Will return
null
if no reason was specified.- Returns:
- Entry's reason
-
setReason
Sets this entry's reason.You can specify
null
to reset the reason.- Parameters:
reason
- Entry's reason
-
getServer
Gets this entry's origin server.- Returns:
- Entry's origin server
-
setServer
Sets this entry's origin server.- Parameters:
server
- Entry's origin server
-
getType
Gets this entry's type.- Returns:
- Entry's type
-
getDate
public long getDate()Gets this entry's creation or modification date, in milliseconds.- Returns:
- Entry's creation or modification date
-
setDate
public void setDate(long date) Sets this entry's modification date.- Parameters:
date
- Entry's modification date
-
getRemovalDate
public long getRemovalDate()Gets this entry's removal's date, in milliseconds.Will return -1 if the entry has not been removed.
- Returns:
- Entry's removal's date
-
setRemovalDate
public void setRemovalDate(long removalDate) Sets this entry's removal's date, in milliseconds.- Parameters:
removalDate
- Entry's removal's date
-
getDuration
public long getDuration()Gets this entry's duration, in milliseconds.Will return -1 if this entry is permanent.
- Returns:
- Entry's duration
-
setDuration
public void setDuration(long duration) Sets this entry's duration, in milliseconds.You can specify -1 for a permanent entry.
- Parameters:
duration
- Entry's duration
-
isGlobal
public boolean isGlobal()Checks if this entry affects all servers inside of the network.Only applies on multi instance setups with a proxy.
- Returns:
- Whether this entry is global
-
setGlobal
public void setGlobal(boolean global) Sets if this entry should affect all servers inside of the network.Only applies on multi instance setups with a proxy.
- Parameters:
global
- Whether this entry is global
-
isSilent
public boolean isSilent()Checks if this entry is silent.If
true
, only Staff members will receive the announcement.- Returns:
- Whether this entry is silent
-
setSilent
public void setSilent(boolean silent) Sets if this entry should be silent.If
true
, only Staff members will receive the announcement.- Parameters:
silent
- Whether this entry is silent
-
formatPlaceholders
Translates an input string with this entry's specific placeholders.Check
PLACEHOLDERS
to find out the available placeholders.- Parameters:
input
- Input containing placeholderslanguage
- Language used to translate the placeholders- Returns:
- Translated placeholders
-
formatPlaceholders
Translates an input string list with this entry's specific placeholders.Check
PLACEHOLDERS
to find out the available placeholders.- Parameters:
input
- Input containing placeholderslanguage
- Language used to translate the placeholders- Returns:
- Translated placeholders
-