aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm/shsupercm/fabric/citresewn/api
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2022-03-06 17:42:04 +0200
committerSHsuperCM <shsupercm@gmail.com>2022-03-06 17:42:04 +0200
commit2356c6bb055079ef03cfd26e9d505ab9cea3960d (patch)
tree4649c1ee2779b4997d1d386222e523d82786f45f /src/main/java/shcm/shsupercm/fabric/citresewn/api
parent526a5f1da2354d328be10c4d6d2f58b3b73e0d20 (diff)
downloadCITResewn-2356c6bb055079ef03cfd26e9d505ab9cea3960d.tar.gz
CITResewn-2356c6bb055079ef03cfd26e9d505ab9cea3960d.tar.bz2
CITResewn-2356c6bb055079ef03cfd26e9d505ab9cea3960d.zip
Modified global properties api a bit
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn/api')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java b/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java
index a3d78ae..05495af 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java
@@ -2,6 +2,8 @@ package shcm.shsupercm.fabric.citresewn.api;
import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue;
+import javax.annotation.Nullable;
+
/**
* @see #globalProperty(String, PropertyValue)
*/
@@ -16,10 +18,9 @@ public interface CITGlobalProperties {
/**
* Invoked before CIT parsing for any global property name associated with the handler's modid.<br>
* May be called multiple times for a key to overwrite its global property with higher-priority resourcepacks.<br>
- * Handlers should take care to reset back any changes global properties make by listening to CIT disposal.
- * @see CITDisposable#dispose()
+ * When unloading resourcepacks(usually before reloading), all keys that were invoked in the previous load will get called again with a null value to allow for disposal.
* @param key name of the property key stripped of its modid
- * @param value the value it's been set to
+ * @param value the value it's been set to or null if resetting
*/
- void globalProperty(String key, PropertyValue value) throws Exception;
+ void globalProperty(String key, @Nullable PropertyValue value) throws Exception;
}