Archiviert
13
0

Don't complain about plugins that does their own dependency management

Let me know if I should add your plugin to the exception list.
Dieser Commit ist enthalten in:
Kristian S. Stangeland 2013-07-25 12:51:41 +02:00
Ursprung 3b76fe3d99
Commit 260f108749

Datei anzeigen

@ -51,6 +51,11 @@ class PluginVerifier {
}
}
/**
* Contains a list of plugins that will detect and use ProtocolLib dynamically, instead of relying on the dependency system.
*/
private static final Set<String> DYNAMIC_DEPENDENCY = Sets.newHashSet("mcore");
/**
* Set of plugins that have been loaded after ProtocolLib.
*/
@ -127,10 +132,11 @@ class PluginVerifier {
public VerificationResult verify(Plugin plugin) {
if (plugin == null)
throw new IllegalArgumentException("plugin cannot be NULL.");
String name = plugin.getName();
// Skip the load order check for ProtocolLib itself
if (!dependency.equals(plugin)) {
if (!loadedAfter.contains(plugin.getName())) {
if (!loadedAfter.contains(name) && !DYNAMIC_DEPENDENCY.contains(name)) {
if (verifyLoadOrder(dependency, plugin)) {
// Memorize
loadedAfter.add(plugin.getName());