diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-03-01 22:04:50 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-03-01 22:04:50 +0000 |
commit | 2e788802fe8856344235c1056bb5f6d66fecf23e (patch) | |
tree | c643712bf3684640a920b475c0a61fe063bebb29 | |
parent | b0552019f53df8d76f051ceca26120ae1e524abf (diff) | |
download | Essentials-2e788802fe8856344235c1056bb5f6d66fecf23e.tar Essentials-2e788802fe8856344235c1056bb5f6d66fecf23e.tar.gz Essentials-2e788802fe8856344235c1056bb5f6d66fecf23e.tar.lz Essentials-2e788802fe8856344235c1056bb5f6d66fecf23e.tar.xz Essentials-2e788802fe8856344235c1056bb5f6d66fecf23e.zip |
Fix kit timers resetting on server restart.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/UserData.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index ea3201f28..cda2fa511 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -817,16 +817,12 @@ public abstract class UserData extends PlayerExtension implements IConf private Map<String, Object> _getKitTimestamps() { - final Object map = config.getProperty("timestamps.kits"); - - if (map instanceof Map) - { - return (Map<String, Object>)map; - } - else + + if (config.isConfigurationSection("timestamps.kits")) { - return new HashMap<String, Object>(); + return config.getConfigurationSection("timestamps.kits").getValues(false); } + return new HashMap<String, Object>(); } public Long getKitTimestamp(final String name) |