diff --git a/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java index 7f606a2f3b..95f4a4d3b5 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -845,11 +845,12 @@ public final class SimplePluginManager implements PluginManager { Preconditions.checkArgument(depend != null, "depend"); if (dependencyGraph.nodes().contains(plugin.getName())) { - if (Graphs.reachableNodes(dependencyGraph, plugin.getName()).contains(depend.getName())) { + Set reachableNodes = Graphs.reachableNodes(dependencyGraph, plugin.getName()); + if (reachableNodes.contains(depend.getName())) { return true; } for (String provided : depend.getProvides()) { - if (Graphs.reachableNodes(dependencyGraph, plugin.getName()).contains(provided)) { + if (reachableNodes.contains(provided)) { return true; } }