Skip to content

Commit

Permalink
Don't complain about plugins that does their own dependency management
Browse files Browse the repository at this point in the history
Let me know if I should add your plugin to the exception list.
  • Loading branch information
aadnk committed Jul 25, 2013
1 parent 3b76fe3 commit 260f108
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -51,6 +51,11 @@ public boolean isValid() {
}
}

/**
* 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.
*/
Expand Down Expand Up @@ -127,10 +132,11 @@ public VerificationResult verify(String pluginName) {
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());
Expand Down

0 comments on commit 260f108

Please sign in to comment.