From c377ed4b57aa4d045571df2419774aca75d64130 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sat, 25 Jul 2020 17:21:42 -0400 Subject: [PATCH] Preserve plugin load order correctly --- .../velocitypowered/proxy/plugin/VelocityPluginManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityPluginManager.java b/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityPluginManager.java index f3931569a..065c0d930 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityPluginManager.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/plugin/VelocityPluginManager.java @@ -28,6 +28,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.IdentityHashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Optional; @@ -84,7 +85,7 @@ public class VelocityPluginManager implements PluginManager { List sortedPlugins = PluginDependencyUtils.sortCandidates(found); Set loadedPluginsById = new HashSet<>(); - Map pluginContainers = new HashMap<>(); + Map pluginContainers = new LinkedHashMap<>(); // Now load the plugins pluginLoad: for (PluginDescription candidate : sortedPlugins) {