程序包 org.bukkit

接口 BanList


public interface BanList
一个封禁列表,包含了一些封禁类型
  • 方法详细资料

    • getBanEntry

      根据封禁目标(IP地址或玩家名)来获取对应的 BanEntry.

      原文:Gets BanEntry by target.

      参数:
      target - 封禁目标(IP地址或玩家名)
      返回:
      这个封禁的BanEntry。如果没有则返回null
    • addBan

      添加一个封禁到这个列表。如果以前的封禁存在,这将更新以前的封禁.

      原文: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则使用默认
      返回:
      新创建的封禁条目,或为更新之前的封禁
    • getBanEntries

      @NotNull @NotNull Set<BanEntry> getBanEntries()
      获取此列表包含的所有BanEntry.

      原文: Gets a set containing every BanEntry in this list.

      返回:
      包含了通过此列表跟踪的每个BanEntry的一个不可变列表
    • isBanned

      boolean isBanned(@NotNull @NotNull String target)
      获取此目标的封禁状态.

      原文: Gets if a BanEntry exists for the target, indicating an active ban status.

      参数:
      target - 寻找的目标
      返回:
      如果BanEntry存在这个名称则表示被封禁了,否则为false
    • pardon

      void pardon(@NotNull @NotNull String target)
      从列表中移除指定目标,因此表示“无封禁”的状态(即解除封禁).

      原文: Removes the specified target from this list, therefore indicating a "not banned" status.

      参数:
      target - 从这个列表移除的目标(解除封禁)