diff options
author | snowleo <schneeleo@gmail.com> | 2011-08-19 02:32:34 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-08-19 02:32:34 +0200 |
commit | 2b48045a8fddbe6b09fbfbcd100de729b89e226a (patch) | |
tree | 5c626beb1900212f57f7fafccb9ff4c3b6745540 | |
parent | a53d8ddef16a9492a5542fab137b9eb9022c8995 (diff) | |
download | Essentials-2b48045a8fddbe6b09fbfbcd100de729b89e226a.tar Essentials-2b48045a8fddbe6b09fbfbcd100de729b89e226a.tar.gz Essentials-2b48045a8fddbe6b09fbfbcd100de729b89e226a.tar.lz Essentials-2b48045a8fddbe6b09fbfbcd100de729b89e226a.tar.xz Essentials-2b48045a8fddbe6b09fbfbcd100de729b89e226a.zip |
Removed unused users map
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Essentials.java | 8 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/UserMap.java | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index 49c3e8e88..56693632e 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -58,7 +58,6 @@ public class Essentials extends JavaPlugin implements IEssentials private transient Backup backup; private transient BanWorkaround bans; private transient ItemDb itemDb; - private transient final Map<String, User> users = new HashMap<String, User>(); private transient EssentialsUpdateTimer updateTimer; private transient final Methods paymentMethod = new Methods(); private transient final static boolean enableErrorLogging = false; @@ -237,11 +236,6 @@ public class Essentials extends JavaPlugin implements IEssentials Util.updateLocale(settings.getLocale(), this); - for (User user : users.values()) - { - user.reloadConfig(); - } - // for motd getConfiguration().load(); } @@ -314,7 +308,7 @@ public class Essentials extends JavaPlugin implements IEssentials } } m = m.replace("{ONLINE}", Integer.toString(getServer().getOnlinePlayers().length - playerHidden)); - m = m.replace("{UNIQUE}", Integer.toString(users.size())); + m = m.replace("{UNIQUE}", Integer.toString(userMap.getUniqueUsers())); if (m.matches(".*\\{PLAYERLIST\\}.*")) { diff --git a/Essentials/src/com/earth2me/essentials/UserMap.java b/Essentials/src/com/earth2me/essentials/UserMap.java index 7a7fdb4af..271d7d0ab 100644 --- a/Essentials/src/com/earth2me/essentials/UserMap.java +++ b/Essentials/src/com/earth2me/essentials/UserMap.java @@ -104,4 +104,9 @@ public class UserMap implements Function<String, User>, IConf } return userSet; } + + public int getUniqueUsers() + { + return users.size(); + } } |