mirror of
https://github.com/LegacyModdingMC/ChunkAPI.git
synced 2026-11-11 16:07:37 +00:00
StableAPI
This commit is contained in:
3 files changed
+48
-2
No files matched your search
@@ -13,14 +13,19 @@
|
||||
package com.falsepattern.chunk.api;
|
||||
|
||||
import com.falsepattern.chunk.internal.ChunkDataRegistryImpl;
|
||||
import com.falsepattern.lib.StableAPI;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* This class is used to register ChunkDataManagers.
|
||||
*
|
||||
* @since 0.1.0
|
||||
* @see ChunkDataManager
|
||||
* @author FalsePattern
|
||||
* @version 0.1.0
|
||||
*/
|
||||
@StableAPI(since = "0.1.0")
|
||||
public class ChunkDataRegistry {
|
||||
/**
|
||||
* Registers a ChunkDataManager. Only do this during the preInit phase.
|
||||
@@ -30,6 +35,7 @@ public class ChunkDataRegistry {
|
||||
* @throws IllegalStateException If the registration stage is over.
|
||||
* @throws IllegalArgumentException If the manager has a duplicate id.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public static void registerDataManager(ChunkDataManager manager)
|
||||
throws IllegalStateException, IllegalArgumentException {
|
||||
ChunkDataRegistryImpl.registerDataManager(manager);
|
||||
@@ -42,6 +48,7 @@ public class ChunkDataRegistry {
|
||||
*
|
||||
* @throws IllegalStateException If the disable stage is over.
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public static void disableDataManager(String domain, String id) throws IllegalStateException {
|
||||
ChunkDataRegistryImpl.disableDataManager(domain, id);
|
||||
}
|
||||
@@ -50,6 +57,7 @@ public class ChunkDataRegistry {
|
||||
* Returns an unmodifiable set of all registered ChunkDataManagers.
|
||||
* The id of a manager is its domain and id separated by a colon. (domain:id)
|
||||
*/
|
||||
@StableAPI.Expose
|
||||
public static Set<String> getRegisteredManagers() {
|
||||
return ChunkDataRegistryImpl.getRegisteredManagers();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user