Class GlobalBlockContainer<S extends Tracked<K>,K extends WorldKey>

java.lang.Object
ovh.paulem.arcana.regions.container.GlobalBlockContainer<S,K>
Type Parameters:
S - the type of the object to track
K - the key used to identify the object

public class GlobalBlockContainer<S extends Tracked<K>,K extends WorldKey> extends Object
A container that holds all the block containers for all worlds. This increases performance when dealing with many worlds, chunks and sections and avoid iterating over every single object.
  • Method Details

    • of

      public static <S extends Tracked<K>, K extends WorldKey> GlobalBlockContainer<S,K> of()
    • getWorldContainer

      @Nullable public @Nullable WorldBlockContainer<S,K> getWorldContainer(UUID worldId)
    • getOrCreateWorldContainer

      public WorldBlockContainer<S,K> getOrCreateWorldContainer(UUID worldId)
    • removeWorldContainer

      public void removeWorldContainer(UUID worldId)
    • getWorldContainer

      @Nullable public @Nullable WorldBlockContainer<S,K> getWorldContainer(org.bukkit.World world)
    • getOrCreateWorldContainer

      public WorldBlockContainer<S,K> getOrCreateWorldContainer(org.bukkit.World world)
    • getHolder

      @Nullable public S getHolder(K key)
    • setHolder

      public void setHolder(K key, S tracked)
    • removeHolder

      public void removeHolder(K key)
    • getAllHolders

      public List<Holder<S,K>> getAllHolders()
    • getAllHolders

      public <T extends Holder<S, K>> List<T> getAllHolders(Class<T> type)