Interface IProtectedRegion

All Known Subinterfaces:
IMarkableRegion
All Known Implementing Classes:
CuboidRegion, CylinderRegion, DimensionalRegion, GlobalRegion, MarkedRegion, PolygonRegion, PrismRegion, ProtectedRegion, SphereRegion

public interface IProtectedRegion
This interface represents a general protected region. This region has most likely a set of flags to prevent certain action in this region and a set of player, which are allowed to bypass these restrictions.

Additionally, a flag can determine whether actions are whitelisted or blacklisted and a flag which determines whether the regions are active or not.

Classes which implement this interface must also provide a way to serialize the region data into a CompoundNBT.

  • Method Details

    • getName

      String getName()
    • getDim

      net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> getDim()
    • getRegionType

      RegionType getRegionType()
    • addFlag

      void addFlag(IFlag flag)
    • removeFlag

      void removeFlag(String flag)
    • containsFlag

      boolean containsFlag(String flag)
    • containsFlag

      boolean containsFlag(RegionFlag flag)
    • setFlags

      void setFlags(RegionFlags flags)
    • setGroups

      void setGroups(Map<String,PlayerContainer> groups)
    • getFlags

      RegionFlags getFlags()
    • getFlag

      @Nullable @Nullable IFlag getFlag(String flagName)
    • addPlayer

      void addPlayer(net.minecraft.world.entity.player.Player player, String group)
    • addPlayer

      void addPlayer(UUID uuid, String playerName, String group)
    • addTeam

      void addTeam(String teamName, String group)
    • removeTeam

      void removeTeam(String teamName, String group)
    • removePlayer

      void removePlayer(UUID playerUuid, String group)
    • hasTeam

      boolean hasTeam(String teamName, String group)
    • hasPlayer

      boolean hasPlayer(UUID playerUuid, String group)
    • getGroup

      PlayerContainer getGroup(String group)
    • getGroups

      Map<String,PlayerContainer> getGroups()
    • permits

      boolean permits(net.minecraft.world.entity.player.Player player)
    • isInGroup

      boolean isInGroup(net.minecraft.world.entity.player.Player player, String group)
    • isActive

      boolean isActive()
    • setIsActive

      void setIsActive(boolean isActive)
    • isMuted

      boolean isMuted()
    • setIsMuted

      void setIsMuted(boolean isMuted)
    • getParent

      IProtectedRegion getParent()
    • getParentName

      String getParentName()
    • getChildren

      Map<String,IProtectedRegion> getChildren()
    • getChildrenNames

      Set<String> getChildrenNames()
    • addChild

      boolean addChild(IProtectedRegion child)
    • removeChild

      void removeChild(IProtectedRegion child)
    • clearChildren

      void clearChildren()
    • resetGroups

      void resetGroups()
    • hasChild

      boolean hasChild(IProtectedRegion child)