fix postLoadHook not executed

dev
Exlll 7 years ago
parent a61363aefd
commit 9ae4731de4

@ -1,5 +1,5 @@
name: ConfigLib
author: Exlll
version: 1.3.1
version: 1.3.2
main: de.exlll.configlib.ConfigLib

@ -1,5 +1,5 @@
name: ConfigLib
author: Exlll
version: 1.3.1
version: 1.3.2
main: de.exlll.configlib.ConfigLib

@ -49,6 +49,7 @@ public abstract class Configuration {
String yaml = ConfigReader.read(configPath);
Map<String, Object> deserializedMap = serializer.deserialize(yaml);
FieldMapper.instanceFromMap(this, deserializedMap);
postLoadHook();
}
/**

@ -10,11 +10,11 @@ interface Defaultable<T> {
default Object fromDefault(final Object instance, Class<?> cls) {
Object newInstance = instance;
if (!Reflect.isSimpleType(cls)) {
newInstance = Reflect.newInstance(cls);
Reflect.checkType(instance, Map.class);
Reflect.checkMapEntries((Map<?, ?>) instance, String.class, Object.class);
@SuppressWarnings("unchecked")
Map<String, ?> map = (Map<String, ?>) instance;
newInstance = Reflect.newInstance(cls);
FieldMapper.instanceFromMap(newInstance, map);
}
Reflect.checkType(newInstance, cls);

@ -135,14 +135,14 @@ public class ExamplePlugin extends JavaPlugin {
<dependency>
<groupId>de.exlll</groupId>
<artifactId>configlib-bukkit</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
</dependency>
<!-- for Bungee plugins -->
<dependency>
<groupId>de.exlll</groupId>
<artifactId>configlib-bungee</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
</dependency>
```
#### Gradle
@ -154,10 +154,10 @@ repositories {
}
dependencies {
// for Bukkit plugins
compile group: 'de.exlll', name: 'configlib-bukkit', version: '1.3.1'
compile group: 'de.exlll', name: 'configlib-bukkit', version: '1.3.2'
// for Bungee plugins
compile group: 'de.exlll', name: 'configlib-bungee', version: '1.3.1'
compile group: 'de.exlll', name: 'configlib-bungee', version: '1.3.2'
}
```
Additionally, you either have to import the Bukkit or BungeeCord API

@ -1,6 +1,6 @@
allprojects {
group 'de.exlll'
version '1.3.1'
version '1.3.2'
}
subprojects {
apply plugin: 'java'

Loading…
Cancel
Save