Package org.bukkit
Interface BanList
-
public interface BanListA ban list, containing bans of someBanList.Type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBanList.TypeRepresents a ban-type that aBanListmay track.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BanEntryaddBan(String target, String reason, Date expires, String source)Adds a ban to the this list.Set<BanEntry>getBanEntries()Gets a set containing everyBanEntryin this list.BanEntrygetBanEntry(String target)Gets aBanEntryby target.booleanisBanned(String target)Gets if aBanEntryexists for the target, indicating an active ban status.voidpardon(String target)Removes the specified target from this list, therefore indicating a "not banned" status.
-
-
-
Method Detail
-
getBanEntry
@Nullable BanEntry getBanEntry(@NotNull String target)
Gets aBanEntryby target.- Parameters:
target- entry parameter to search for- Returns:
- the corresponding entry, or null if none found
-
addBan
@Nullable BanEntry addBan(@NotNull String target, @Nullable String reason, @Nullable Date expires, @Nullable String source)
Adds a ban to the this list. If a previous ban exists, this will update the previous entry.- Parameters:
target- the target of the banreason- reason for the ban, null indicates implementation defaultexpires- date for the ban's expiration (unban), or null to imply foreversource- source of the ban, null indicates implementation default- Returns:
- the entry for the newly created ban, or the entry for the (updated) previous ban
-
getBanEntries
@NotNull Set<BanEntry> getBanEntries()
Gets a set containing everyBanEntryin this list.- Returns:
- an immutable set containing every entry tracked by this list
-
isBanned
boolean isBanned(@NotNull String target)Gets if aBanEntryexists for the target, indicating an active ban status.- Parameters:
target- the target to find- Returns:
- true if a
BanEntryexists for the name, indicating an active ban status, false otherwise
-
pardon
void pardon(@NotNull String target)Removes the specified target from this list, therefore indicating a "not banned" status.- Parameters:
target- the target to remove from this list
-
-