Interface ProfileBanList
- All Superinterfaces:
BanList<PlayerProfile>
A
BanList targeting player profile bans.-
Nested Class Summary
Nested classes/interfaces inherited from interface BanList
BanList.Type -
Method Summary
Modifier and TypeMethodDescriptionaddBan(PlayerProfile target, @Nullable String reason, @Nullable Date expires, @Nullable String source) Adds a ban to this list.<E extends BanEntry<? super PlayerProfile>>
@Nullable EaddBan(PlayerProfile target, @Nullable String reason, @Nullable Duration duration, @Nullable String source) Deprecated.<E extends BanEntry<? super PlayerProfile>>
@Nullable EaddBan(PlayerProfile target, @Nullable String reason, @Nullable Instant expires, @Nullable String source) Deprecated.<E extends BanEntry<? super PlayerProfile>>
@Nullable EaddBan(PlayerProfile target, @Nullable String reason, @Nullable Date expires, @Nullable String source) <E extends BanEntry<? super PlayerProfile>>
@Nullable EgetBanEntry(PlayerProfile target) Deprecated.booleanisBanned(PlayerProfile target) Deprecated.voidpardon(PlayerProfile target) Deprecated.Methods inherited from interface BanList
addBan, addBan, addBan, getBanEntries, getBanEntry, getBanEntry, getEntries, isBanned, isBanned, pardon, pardon
-
Method Details
-
addBan
@Deprecated <E extends BanEntry<? super PlayerProfile>> @Nullable E addBan(PlayerProfile 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.- Type Parameters:
E- the type of the ban 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
- Throws:
IllegalArgumentException- if ProfilePlayer has an invalid UUID
-
addBan
@Nullable BanEntry<PlayerProfile> addBan(PlayerProfile 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.- Specified by:
addBanin interfaceBanList<PlayerProfile>- 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
- Throws:
IllegalArgumentException- if ProfilePlayer has an invalid UUID
-
getBanEntry
@Deprecated <E extends BanEntry<? super PlayerProfile>> @Nullable E getBanEntry(PlayerProfile target) Deprecated.Gets aBanEntryby target.- Type Parameters:
E- the type of the ban entry- Parameters:
target- entry parameter to search for- Returns:
- the corresponding entry, or null if none found
-
isBanned
-
pardon
Deprecated.Removes the specified target from this list, therefore indicating a "not banned" status.- Parameters:
target- the target to remove from this list
-
addBan
@Deprecated <E extends BanEntry<? super PlayerProfile>> @Nullable E addBan(PlayerProfile target, @Nullable String reason, @Nullable Instant expires, @Nullable String source) Deprecated.Adds a ban to this list. If a previous ban exists, this will update the previous entry.- Type Parameters:
E- the type of the ban entry- Parameters:
target- the target of the banreason- reason for the ban, null indicates implementation defaultexpires- instant 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
-
addBan
@Deprecated <E extends BanEntry<? super PlayerProfile>> @Nullable E addBan(PlayerProfile target, @Nullable String reason, @Nullable Duration duration, @Nullable String source) Deprecated.Adds a ban to this list. If a previous ban exists, this will update the previous entry.- Type Parameters:
E- the type of the ban entry- Parameters:
target- the target of the banreason- reason for the ban, null indicates implementation defaultduration- the duration of the ban, 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
-
BanList.addBan(Object, String, Duration, String)