Files
ChunkAPI/src/main/java/com/falsepattern/chunk/api/ChunkDataRegistry.java
T

29 lines
1.1 KiB
Java

package com.falsepattern.chunk.api;
import com.falsepattern.chunk.internal.ChunkDataRegistryImpl;
/**
* This class is used to register ChunkDataManagers.
* @see ChunkDataManager
*/
public class ChunkDataRegistry {
/**
* Registers a ChunkDataManager. Only do this during the preInit phase.
* @param manager The manager to register.
* @throws IllegalStateException If the registration stage is over.
* @throws IllegalArgumentException If the manager has a duplicate id.
*/
public static void registerDataManager(ChunkDataManager manager) throws IllegalStateException, IllegalArgumentException {
ChunkDataRegistryImpl.registerDataManager(manager);
}
/**
* Disables a ChunkDataManager. Only do this during the preInit phase.
* @param id The id of the manager to disable.
* @throws IllegalStateException If the disable stage is over.
*/
public static void disableDataManager(String domain, String id) throws IllegalStateException {
ChunkDataRegistryImpl.disableDataManager(domain, id);
}
}