Skip to content

Commit 34a49ea

Browse files
committed
Fix missing config load functions
1 parent f91ff36 commit 34a49ea

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

pvpmanager/src/main/java/me/chancesd/pvpmanager/setting/Conf.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ private void loadRegular(final @NotNull String path) {
238238
doubleValue = config.getDouble(path, (double) def);
239239
} else if (clazz == List.class) {
240240
stringList = config.getStringList(path);
241+
} else {
242+
Log.severe("Error loading config value for " + path);
241243
}
242244
}
243245

@@ -255,6 +257,12 @@ private void loadFunction(final @NotNull String path) {
255257
stringValue = (String) function.apply(config.getString(path));
256258
} else if (clazzResult == Boolean.class) {
257259
boolValue = (boolean) function.apply(config.getBoolean(path));
260+
} else if (clazzResult == Integer.class) {
261+
intValue = (int) function.apply(config.getInt(path));
262+
} else if (clazzResult == Double.class) {
263+
doubleValue = (double) function.apply(config.getDouble(path));
264+
} else {
265+
Log.severe("Error loading config value for " + path);
258266
}
259267
}
260268

pvpmanager/src/main/resources/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ General Settings:
2121
Combat Tag:
2222
Enabled: true
2323
# How long should the combat tag last in seconds
24-
Time: 20
24+
Time: 15
2525
# Sets the player glowing while tagged, for MC 1.9+
2626
Glowing: true
2727
# Will untag the player when they kill their current enemies

0 commit comments

Comments
 (0)