From c8138117217a8c5fc633c94b48d02d5c0d871cce Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Tue, 30 Apr 2013 03:17:59 +0200 Subject: [PATCH] No point verifying the load order for ProtocolLib. Also removed a debug message. --- .../com/comphenix/protocol/CommandPacket.java | 1 - .../protocol/injector/PluginVerifier.java | 15 +++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandPacket.java b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandPacket.java index a12b5c50..72eac4c4 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/CommandPacket.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/CommandPacket.java @@ -348,7 +348,6 @@ class CommandPacket extends CommandBase { else if (side.isForServer()) supported.addAll(Packets.Server.getSupported()); - System.out.println("Supported for " + side + ": " + supported); return supported; } diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/PluginVerifier.java b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/PluginVerifier.java index 9be75b1b..ebb98a26 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/injector/PluginVerifier.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/injector/PluginVerifier.java @@ -120,12 +120,15 @@ class PluginVerifier { if (plugin == null) throw new IllegalArgumentException("plugin cannot be NULL."); - if (!loadedAfter.contains(plugin.getName())) { - if (verifyLoadOrder(dependency, plugin)) { - // Memorize - loadedAfter.add(plugin.getName()); - } else { - return VerificationResult.NO_DEPEND; + // Skip the load order check for ProtocolLib itself + if (!dependency.equals(plugin)) { + if (!loadedAfter.contains(plugin.getName())) { + if (verifyLoadOrder(dependency, plugin)) { + // Memorize + loadedAfter.add(plugin.getName()); + } else { + return VerificationResult.NO_DEPEND; + } } }