Class Realm

java.lang.Object
com.mclds.plugins.realm.Realm

public class Realm extends Object
  • Field Details

    • name

      public String name
    • owner_uuid

      public String owner_uuid
    • nickname

      public String nickname
      目前用于传送指令
    • root

      @Nullable public @Nullable org.bukkit.Location root
    • root_realm_data

      @Nullable public @Nullable Realm.RootRealmData root_realm_data
    • location

      public org.bukkit.Location location
    • children

      public Set<org.bukkit.Location> children
      子领地
    • create_at

      public double create_at
      创建时间,对金币返还有帮助
    • explosion_destroyable_blocks

      public List<String> explosion_destroyable_blocks
      可以被爆炸破坏的方块
    • explosion_protect_blocks

      public List<String> explosion_protect_blocks
      爆炸时可以保护的方块
  • Constructor Details

    • Realm

      public Realm(String owner_uuid, org.bukkit.Location location, @Nullable @Nullable org.bukkit.Location root)
  • Method Details

    • isRoot

      public boolean isRoot()
    • getOwner

      public org.bukkit.OfflinePlayer getOwner()
    • isOwner

      public boolean isOwner(org.bukkit.OfflinePlayer player)
    • isMember

      public boolean isMember(org.bukkit.OfflinePlayer player)
    • isMemberHasPermission

      public boolean isMemberHasPermission(org.bukkit.OfflinePlayer member, RealmPermission permission)
    • getMemberPlayers

      public Set<org.bukkit.OfflinePlayer> getMemberPlayers()
    • getMember

      public Member getMember(org.bukkit.OfflinePlayer player)
    • addMember

      public boolean addMember(org.bukkit.OfflinePlayer player)
    • addMembers

      public boolean addMembers(Set<org.bukkit.OfflinePlayer> players)
    • update

      public boolean update()
    • removeMember

      public boolean removeMember(org.bukkit.OfflinePlayer player)
    • getRootRealm

      @Nullable public @Nullable Realm getRootRealm()
      获取主领地 如果当前领地是主领地,则返回NULL
    • getRootRealmOrSelf

      public Realm getRootRealmOrSelf()
    • children

      public Set<@Nullable Realm> children()
    • save

      public void save()
    • addChild

      public void addChild(Realm realm)
    • removeChild

      public void removeChild(Realm realm)
    • getViewRecords

      public LinkedHashMap<String,Double> getViewRecords()
    • getValidViewCount

      public int getValidViewCount()
      获取有效的领地浏览数量
    • increaseViewCount

      public void increaseViewCount(String uniqueViewKey)
    • setListShowType

      public void setListShowType(RealmListShowType listShowType)
    • getListShowType

      public RealmListShowType getListShowType()
    • findRootRealmAndSort

      public static List<Realm> findRootRealmAndSort(List<Realm> realms, RealmSortType sortType)
      找到每个不用子领地的主领地,并对其排序领地
    • sort

      public static List<Realm> sort(List<Realm> realms, RealmSortType sortType)
    • setRealmTeleportLocation

      public void setRealmTeleportLocation(org.bukkit.Location location)
      设置主领地传送位置,如果当前领地不是主领地,则无法操作
    • getRealmTeleportLocation

      @Nullable public @Nullable org.bukkit.Location getRealmTeleportLocation()
      获取主领地传送位置,如果当前领地不是主领地,则返回NULL
    • saveRootRealmSetting

      public void saveRootRealmSetting(RealmSetting setting)
    • getRootRealmSetting

      public RealmSetting getRootRealmSetting()
      获取主领地设置
    • getName

      public String getName()
    • getNameOrRootName

      public String getNameOrRootName()
    • getFullDisplayName

      public String getFullDisplayName()
    • getLocationFormat

      public String getLocationFormat()
    • getByLocationFormat

      public static Realm getByLocationFormat(String locationFormat)
    • setIcon

      public void setIcon(String namespacedId)
    • setDescription

      public void setDescription(String desc)
    • setMembers

      public void setMembers(Set<Member> members)
    • clearMembers

      public void clearMembers()
    • hasIcon

      public boolean hasIcon()
    • getIcon

      public String getIcon()
    • getIconItem

      public org.bukkit.inventory.ItemStack getIconItem(org.bukkit.entity.Player viewer)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getRealmTotalMembers

      public static Set<Member> getRealmTotalMembers(Realm realm)
      获取当前领地所属的主领地的全部成员
    • isSameRootRealm

      public boolean isSameRootRealm(Realm other)
      判断两个领地是否属于同一个主领地
      Parameters:
      other - 另一个领地
    • getExplosionDestroyableBlocks

      public List<String> getExplosionDestroyableBlocks()
    • setExplosionDestroyableBlocks

      public void setExplosionDestroyableBlocks(List<String> blocks)
    • setExplosionProtectBlocks

      public void setExplosionProtectBlocks(List<String> explosion_protect_blocks)
    • getExplosionProtectBlocks

      public List<String> getExplosionProtectBlocks()
    • toString

      public String toString()
      Overrides:
      toString in class Object