# 接口的使用
org.bukkit.BanEntry

使用BanEntry的程序包
程序包
说明
org.bukkit
Bukkit API的顶级程序包, 包含通用的API类和接口.
org.bukkit.ban
Classes relevant to bans.
org.bukkit.entity
为在`世界`内存在的非三维像素单位(实体)提供的接口，包含玩家、怪物、抛射物等.

- ## org.bukkit中BanEntry的使用

  返回BanEntry的org.bukkit中的方法
  修饰符和类型
  方法
  说明
  `@Nullable BanEntry<T>`
  BanList.`addBan(@NotNull String target, @Nullable String reason, @Nullable Date expires, @Nullable String source)`
  已过时。
  参见 `BanList.addBan(Object, String, Date, String)`
  `@Nullable BanEntry<T>`
  BanList.`addBan(T target, @Nullable String reason, @Nullable Duration duration, @Nullable String source)`
  添加一个封禁到这个列表。
  `@Nullable BanEntry<T>`
  BanList.`addBan(T target, @Nullable String reason, @Nullable Instant expires, @Nullable String source)`
  添加一个封禁到这个列表。
  `@Nullable BanEntry<T>`
  BanList.`addBan(T target, @Nullable String reason, @Nullable Date expires, @Nullable String source)`
  添加一个封禁到这个列表。
  `@Nullable BanEntry<PlayerProfile>`
  OfflinePlayer.`ban(@Nullable String reason, @Nullable Duration duration, @Nullable String source)`
  Adds this user to the `ProfileBanList`.
  `@Nullable BanEntry<PlayerProfile>`
  OfflinePlayer.`ban(@Nullable String reason, @Nullable Instant expires, @Nullable String source)`
  Adds this user to the `ProfileBanList`.
  `@Nullable BanEntry<PlayerProfile>`
  OfflinePlayer.`ban(@Nullable String reason, @Nullable Date expires, @Nullable String source)`
  Adds this user to the `ProfileBanList`.
  `@Nullable BanEntry<T>`
  BanList.`getBanEntry(@NotNull String target)`
  已过时。
  参见 `BanList.getBanEntry(Object)`
  `@Nullable BanEntry<T>`
  BanList.`getBanEntry(T target)`
  根据封禁目标(IP地址或玩家资料)来获取对应的 `BanEntry`.
  返回变量类型为BanEntry的类型的org.bukkit中的方法
  修饰符和类型
  方法
  说明
  `@NotNull Set<BanEntry>`
  BanList.`getBanEntries()`
  已过时。
  该方法返回了一个形参化类的原始使用, 推荐使用带泛型参数的 `BanList.getEntries()`
  `@NotNull Set<BanEntry<T>>`
  BanList.`getEntries()`
  获取此列表包含的所有`BanEntry`.

- ## org.bukkit.ban中BanEntry的使用

  返回BanEntry的org.bukkit.ban中的方法
  修饰符和类型
  方法
  说明
  `@Nullable BanEntry<PlayerProfile>`
  ProfileBanList.`addBan(@NotNull PlayerProfile target, @Nullable String reason, @Nullable Date expires, @Nullable String source)`
  添加一个封禁到这个列表。

- ## org.bukkit.entity中BanEntry的使用

  返回BanEntry的org.bukkit.entity中的方法
  修饰符和类型
  方法
  说明
  `@Nullable BanEntry<PlayerProfile>`
  Player.`ban(@Nullable String reason, @Nullable Duration duration, @Nullable String source, boolean kickPlayer)`
  Adds this user to the `ProfileBanList`.
  `@Nullable BanEntry<PlayerProfile>`
  Player.`ban(@Nullable String reason, @Nullable Instant expires, @Nullable String source, boolean kickPlayer)`
  Adds this user to the `ProfileBanList`.
  `@Nullable BanEntry<PlayerProfile>`
  Player.`ban(@Nullable String reason, @Nullable Date expires, @Nullable String source, boolean kickPlayer)`
  Adds this user to the `ProfileBanList`.
  `@Nullable BanEntry<InetAddress>`
  Player.`banIp(@Nullable String reason, @Nullable Duration duration, @Nullable String source, boolean kickPlayer)`
  Adds this user's current IP address to the `IpBanList`.
  `@Nullable BanEntry<InetAddress>`
  Player.`banIp(@Nullable String reason, @Nullable Instant expires, @Nullable String source, boolean kickPlayer)`
  Adds this user's current IP address to the `IpBanList`.
  `@Nullable BanEntry<InetAddress>`
  Player.`banIp(@Nullable String reason, @Nullable Date expires, @Nullable String source, boolean kickPlayer)`
  Adds this user's current IP address to the `IpBanList`.