Metrics: only track each plugin once

This commit is contained in:
Dan Mulloy 2021-06-26 21:22:52 -04:00
parent 7a8fce224e
commit dd85904642
No known key found for this signature in database
GPG Key ID: 2B62F7DACFF133E8
1 changed files with 1 additions and 7 deletions

View File

@ -86,13 +86,7 @@ public class Statistics {
for (PacketListener listener : ProtocolLibrary.getProtocolManager().getPacketListeners()) {
String name = PacketAdapter.getPluginName(listener);
// Increment occurence
if (!users.containsKey(name)) {
users.put(name, 1);
} else {
users.put(name, users.get(name) + 1);
}
users.put(name, 1);
}
return users;