File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/java/com/github/games647/scoreboardstats/pvpstats Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 22
33import com .github .games647 .scoreboardstats .ScoreboardStats ;
44import com .github .games647 .scoreboardstats .config .Settings ;
5+ import com .google .common .collect .ImmutableMap ;
56import com .google .common .collect .Lists ;
67import com .google .common .collect .Maps ;
78import com .zaxxer .hikari .HikariDataSource ;
@@ -37,7 +38,6 @@ public class Database {
3738 private static final String METAKEY = "player_stats" ;
3839
3940 private final ScoreboardStats plugin ;
40-
4141 private final Map <String , Integer > toplist = Maps .newHashMapWithExpectedSize (Settings .getTopitems ());
4242
4343 private final DatabaseConfiguration dbConfig ;
@@ -329,7 +329,7 @@ public void setupDatabase() {
329329 */
330330 public Iterable <Entry <String , Integer >> getTop () {
331331 synchronized (toplist ) {
332- return toplist .entrySet ();
332+ return ImmutableMap . copyOf ( toplist ) .entrySet ();
333333 }
334334 }
335335
You can’t perform that action at this time.
0 commit comments