Package org.bukkit.ban
Interface ProfileBanList
- All Superinterfaces:
BanList<PlayerProfile>
A
BanList
targeting player profile bans.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.BanList
BanList.Type
-
Method Summary
Modifier and TypeMethodDescriptionaddBan
(PlayerProfile target, String reason, Date expires, String source) Adds a ban to this list.Methods inherited from interface org.bukkit.BanList
addBan, addBan, addBan, getBanEntries, getBanEntry, getBanEntry, getEntries, isBanned, isBanned, pardon, pardon
-
Method Details
-
addBan
@Nullable BanEntry<PlayerProfile> addBan(@NotNull 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:
addBan
in 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
-