程序包 org.bukkit
接口 BanList<T>
- 类型参数:
T- 封禁目标
- 所有已知子接口:
IpBanList,ProfileBanList
public interface BanList<T>
一个封禁列表,包含了一些
封禁类型-
嵌套类概要
嵌套类 -
方法概要
修饰符和类型方法说明addBan(@NotNull String target, @Nullable String reason, @Nullable Date expires, @Nullable String source) 已过时。添加一个封禁到这个列表。添加一个封禁到这个列表。添加一个封禁到这个列表。已过时。该方法返回了一个形参化类的原始使用, 推荐使用带泛型参数的getEntries()getBanEntry(@NotNull String target) 已过时。getBanEntry(T target) 根据封禁目标(IP地址或玩家资料)来获取对应的BanEntry.获取此列表包含的所有BanEntry.boolean已过时。boolean获取此目标的封禁状态.void已过时。void从列表中移除指定目标,因此表示“无封禁”的状态(即解除封禁).
-
方法详细资料
-
getBanEntry
@Deprecated(since="1.20.1") @Nullable @Nullable BanEntry<T> getBanEntry(@NotNull @NotNull String target) 已过时。- 参数:
target- 封禁目标(IP地址或玩家名)- 返回:
- 对应的封禁条目, 如果没有则返回null
-
getBanEntry
- 参数:
target- 封禁目标(IP地址或玩家资料)- 返回:
- 对应的封禁条目, 如果没有则返回null
-
addBan
@Deprecated(since="1.20.1") @Nullable @Nullable BanEntry<T> addBan(@NotNull @NotNull String target, @Nullable @Nullable String reason, @Nullable @Nullable Date expires, @Nullable @Nullable String source) 添加一个封禁到这个列表。如果以前的封禁存在,这将更新以前的封禁.原文:Adds a ban to the this list. If a previous ban exists, this will update the previous entry.
- 参数:
target- 封禁目标reason- 封禁理由,null则使用默认expires- 封禁的截止日期(解除封禁),null则为永远封禁source- 封禁来源,null则使用默认- 返回:
- 新创建的封禁条目,或为更新之前的封禁
-
addBan
@Nullable @Nullable BanEntry<T> addBan(@NotNull T target, @Nullable @Nullable String reason, @Nullable @Nullable Date expires, @Nullable @Nullable String source) 添加一个封禁到这个列表。如果以前的封禁存在,这将更新以前的封禁.原文:Adds a ban to this list. If a previous ban exists, this will update the previous entry.
- 参数:
target- 封禁目标reason- 封禁理由,null则使用默认expires- 封禁的截止日期(解除封禁),null则为永远封禁source- 封禁来源,null则使用默认- 返回:
- 新创建的封禁条目,或为更新之前的封禁
-
addBan
@Nullable @Nullable BanEntry<T> addBan(@NotNull T target, @Nullable @Nullable String reason, @Nullable @Nullable Instant expires, @Nullable @Nullable String source) 添加一个封禁到这个列表。如果以前的封禁存在,这将更新以前的封禁.原文:Adds a ban to this list. If a previous ban exists, this will update the previous entry.
- 参数:
target- 封禁目标reason- 封禁理由,null则使用默认expires- 封禁的截止日期(解除封禁),null则为永远封禁source- 封禁来源,null则使用默认- 返回:
- 新创建的封禁条目,或为更新之前的封禁
-
addBan
@Nullable @Nullable BanEntry<T> addBan(@NotNull T target, @Nullable @Nullable String reason, @Nullable @Nullable Duration duration, @Nullable @Nullable String source) 添加一个封禁到这个列表。如果以前的封禁存在,这将更新以前的封禁.原文:Adds a ban to this list. If a previous ban exists, this will update the previous entry.
- 参数:
target- 封禁目标reason- 封禁理由,null则使用默认duration- 封禁持续时长, null则为永远封禁source- 封禁来源,null则使用默认- 返回:
- 新创建的封禁条目,或为更新之前的封禁
-
getBanEntries
已过时。该方法返回了一个形参化类的原始使用, 推荐使用带泛型参数的getEntries()- 返回:
- 包含了通过此列表跟踪的每个BanEntry的一个不可变列表
-
getEntries
- 返回:
- 包含了通过此列表跟踪的每个BanEntry的一个不可变列表
-
isBanned
获取此目标的封禁状态.原文:Gets if a
BanEntryexists for the target, indicating an active ban status.- 参数:
target- 寻找的目标- 返回:
- 如果
BanEntry存在这个目标则表示被封禁了,否则为false
-
isBanned
已过时。获取此目标的封禁状态.原文: Gets if a
BanEntryexists for the target, indicating an active ban status.- 参数:
target- 寻找的目标- 返回:
- 如果
BanEntry存在这个目标则表示被封禁了,否则为false
-
pardon
从列表中移除指定目标,因此表示“无封禁”的状态(即解除封禁).原文: Removes the specified target from this list, therefore indicating a "not banned" status.
- 参数:
target- 从这个列表移除的目标(解除封禁)
-
pardon
已过时。从列表中移除指定目标,因此表示“无封禁”的状态(即解除封禁).原文: Removes the specified target from this list, therefore indicating a "not banned" status.
- 参数:
target- 从这个列表移除的目标(解除封禁)
-
addBan(Object, String, Date, String)