diff --git a/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java b/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java index d715ffe..d25376a 100644 --- a/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java +++ b/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java @@ -71,8 +71,8 @@ public abstract class BlueMapAPI { private static BlueMapAPI instance; - private static final Collection> onEnableConsumers = new HashSet<>(2); - private static final Collection> onDisableConsumers = new HashSet<>(2); + private static final LinkedHashSet> onEnableConsumers = new LinkedHashSet<>(); + private static final LinkedHashSet> onDisableConsumers = new LinkedHashSet<>(); /** * Getter for the {@link RenderManager}. @@ -163,6 +163,7 @@ public abstract class BlueMapAPI { *

The {@link Consumer} can be called multiple times if BlueMap disables and enables again, e.g. if BlueMap gets reloaded!

*

(Note: The consumer will likely be called asynchronously, not on the server-thread!)

*

Remember to unregister the consumer when you no longer need it using {@link #unregisterListener(Consumer)}.

+ *

The {@link Consumer}s are guaranteed to be called in the order they were registered in.

* @param consumer the {@link Consumer} */ public static synchronized void onEnable(Consumer consumer) { @@ -176,6 +177,7 @@ public abstract class BlueMapAPI { *

The {@link Consumer} can be called multiple times if BlueMap disables and enables again, e.g. if BlueMap gets reloaded!

*

(Note: The consumer will likely be called asynchronously, not on the server-thread!)

*

Remember to unregister the consumer when you no longer need it using {@link #unregisterListener(Consumer)}.

+ *

The {@link Consumer}s are guaranteed to be called in the order they were registered in.

* @param consumer the {@link Consumer} */ public static synchronized void onDisable(Consumer consumer) {