Package org.bukkit
Interface BanList<T>
- Type Parameters:
- T- The ban target
- All Known Subinterfaces:
- IpBanList,- ProfileBanList
public interface BanList<T>
A ban list, containing bans of some 
BanList.Type.- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionDeprecated.Adds a ban to this list.Adds a ban to this list.Adds a ban to this list.Deprecated.This return a generic class, prefer usegetEntries()getBanEntry(String target) Deprecated.getBanEntry(T target) Gets aBanEntryby target.Gets a set containing everyBanEntryin this list.booleanDeprecated.seeisBanned(Object)booleanGets if aBanEntryexists for the target, indicating an active ban status.voidDeprecated.seepardon(Object)voidRemoves the specified target from this list, therefore indicating a "not banned" status.
- 
Method Details- 
getBanEntryDeprecated.Gets aBanEntryby target.- Parameters:
- target- entry parameter to search for
- Returns:
- the corresponding entry, or null if none found
 
- 
getBanEntryGets aBanEntryby target.- Parameters:
- target- entry parameter to search for
- Returns:
- the corresponding entry, or null if none found
 
- 
addBan@Deprecated(since="1.20.1") @Nullable BanEntry<T> addBan(@NotNull String target, @Nullable String reason, @Nullable Date expires, @Nullable String source) Deprecated.Adds a ban to this list. If a previous ban exists, this will update the previous entry.- Parameters:
- target- the target of the ban
- reason- reason for the ban, null indicates implementation default
- expires- date for the ban's expiration (unban), or null to imply forever
- source- source of the ban, null indicates implementation default
- Returns:
- the entry for the newly created ban, or the entry for the (updated) previous ban
 
- 
addBan@Nullable BanEntry<T> addBan(@NotNull T target, @Nullable String reason, @Nullable Date expires, @Nullable String source) Adds a ban to this list. If a previous ban exists, this will update the previous entry.- Parameters:
- target- the target of the ban
- reason- reason for the ban, null indicates implementation default
- expires- date for the ban's expiration (unban), or null to imply forever
- source- source of the ban, null indicates implementation default
- Returns:
- the entry for the newly created ban, or the entry for the (updated) previous ban
 
- 
addBan@Nullable BanEntry<T> addBan(@NotNull T target, @Nullable String reason, @Nullable Instant expires, @Nullable String source) Adds a ban to this list. If a previous ban exists, this will update the previous entry.- Parameters:
- target- the target of the ban
- reason- reason for the ban, null indicates implementation default
- expires- instant for the ban's expiration (unban), or null to imply forever
- source- source of the ban, null indicates implementation default
- Returns:
- the entry for the newly created ban, or the entry for the (updated) previous ban
 
- 
addBan@Nullable BanEntry<T> addBan(@NotNull T target, @Nullable String reason, @Nullable Duration duration, @Nullable String source) Adds a ban to this list. If a previous ban exists, this will update the previous entry.- Parameters:
- target- the target of the ban
- reason- reason for the ban, null indicates implementation default
- duration- the duration of the ban, or null to imply forever
- source- source of the ban, null indicates implementation default
- Returns:
- the entry for the newly created ban, or the entry for the (updated) previous ban
 
- 
getBanEntriesDeprecated.This return a generic class, prefer usegetEntries()Gets a set containing everyBanEntryin this list.- Returns:
- an immutable set containing every entry tracked by this list
 
- 
getEntriesGets a set containing everyBanEntryin this list.- Returns:
- an immutable set containing every entry tracked by this list
 
- 
isBannedGets if aBanEntryexists for the target, indicating an active ban status.- Parameters:
- target- the target to find
- Returns:
- true if a BanEntryexists for the target, indicating an active ban status, false otherwise
 
- 
isBannedDeprecated.seeisBanned(Object)Gets if aBanEntryexists for the target, indicating an active ban status.- Parameters:
- target- the target to find
- Returns:
- true if a BanEntryexists for the target, indicating an active ban status, false otherwise
 
- 
pardonRemoves the specified target from this list, therefore indicating a "not banned" status.- Parameters:
- target- the target to remove from this list
 
- 
pardonDeprecated.seepardon(Object)Removes the specified target from this list, therefore indicating a "not banned" status.- Parameters:
- target- the target to remove from this list
 
 
- 
addBan(Object, String, Date, String)