2023-03-09 21:44:17 +01:00
|
|
|
package com.falsepattern.chunk.api;
|
|
|
|
|
|
|
|
|
|
import com.falsepattern.chunk.internal.ChunkDataRegistryImpl;
|
|
|
|
|
import com.falsepattern.chunk.api.exception.ManagerRegistrationException;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This class is used to register ChunkDataManagers.
|
2023-03-28 23:58:39 +02:00
|
|
|
* @see ChunkDataManager
|
2023-03-09 21:44:17 +01:00
|
|
|
*/
|
|
|
|
|
public class ChunkDataRegistry {
|
2023-03-28 23:58:39 +02:00
|
|
|
/**
|
|
|
|
|
* Registers a ChunkDataManager. Only do this during the preInit phase.
|
|
|
|
|
* @param manager The manager to register.
|
|
|
|
|
* @throws ManagerRegistrationException If the manager is already registered.
|
|
|
|
|
*/
|
|
|
|
|
public static void registerDataManager(ChunkDataManager<?> manager) throws ManagerRegistrationException {
|
2023-03-09 21:44:17 +01:00
|
|
|
ChunkDataRegistryImpl.registerDataManager(manager);
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-28 23:58:39 +02:00
|
|
|
/**
|
|
|
|
|
* Disables a ChunkDataManager. Only do this during the preInit phase.
|
|
|
|
|
* @param id The id of the manager to disable.
|
|
|
|
|
*/
|
2023-03-29 00:26:15 +02:00
|
|
|
public static void disableDataManager(String domain, String id) {
|
|
|
|
|
ChunkDataRegistryImpl.disableDataManager(domain, id);
|
2023-03-09 21:44:17 +01:00
|
|
|
}
|
|
|
|
|
}
|