File tree Expand file tree Collapse file tree
Insights-API/src/main/java/dev/frankheijden/insights/api/addons
Insights-Core/src/main/java/dev/frankheijden/insights Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313import java .nio .file .Files ;
1414import java .nio .file .Path ;
1515import java .util .ArrayList ;
16- import java .util .HashMap ;
1716import java .util .List ;
1817import java .util .Map ;
1918import java .util .Optional ;
19+ import java .util .concurrent .ConcurrentHashMap ;
2020import java .util .jar .JarEntry ;
2121import java .util .jar .JarInputStream ;
2222import java .util .logging .Level ;
@@ -36,7 +36,7 @@ public class AddonManager {
3636 public AddonManager (InsightsPlugin plugin , Path addonsFolder ) {
3737 this .plugin = plugin ;
3838 this .addonsFolder = addonsFolder ;
39- this .addons = new HashMap <>();
39+ this .addons = new ConcurrentHashMap <>();
4040 }
4141
4242 /**
Original file line number Diff line number Diff line change @@ -118,13 +118,13 @@ public void onEnable() {
118118 ex .printStackTrace ();
119119 }
120120
121- getServer ().getGlobalRegionScheduler ().runDelayed (this , (scheduledTask ) -> {
121+ getServer ().getAsyncScheduler ().runDelayed (this , (scheduledTask ) -> {
122122 try {
123123 addonManager .loadAddons ();
124124 } catch (IOException ex ) {
125125 ex .printStackTrace ();
126126 }
127- }, 1 );
127+ }, 50L , TimeUnit . MILLISECONDS );
128128
129129 playerList = new PlayerList (Bukkit .getOnlinePlayers ());
130130 worldStorage = new WorldStorage ();
You can’t perform that action at this time.
0 commit comments