File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
ProtocolLib/src/main/java/com/comphenix/protocol Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -490,15 +490,16 @@ private MinecraftVersion verifyMinecraftVersion() {
490
490
491
491
private void checkConflictingVersions () {
492
492
Pattern ourPlugin = Pattern .compile ("ProtocolLib-(.*)\\ .jar" );
493
- MinecraftVersion currentVersion = new MinecraftVersion (this . getDescription ().getVersion ());
493
+ MinecraftVersion currentVersion = new MinecraftVersion (getDescription ().getVersion ());
494
494
MinecraftVersion newestVersion = null ;
495
495
496
496
// Skip the file that contains this current instance however
497
497
File loadedFile = getFile ();
498
498
499
499
try {
500
500
// Scan the plugin folder for newer versions of ProtocolLib
501
- File pluginFolder = new File ("plugins/" );
501
+ // The plugin folder isn't always plugins/
502
+ File pluginFolder = getDataFolder ().getParentFile ();
502
503
503
504
for (File candidate : pluginFolder .listFiles ()) {
504
505
if (candidate .isFile () && !candidate .equals (loadedFile )) {
@@ -516,6 +517,7 @@ private void checkConflictingVersions() {
516
517
}
517
518
}
518
519
} catch (Exception e ) {
520
+ // TODO This shows [ProtocolLib] and [ProtocolLibrary] in the message
519
521
reporter .reportWarning (this , Report .newBuilder (REPORT_CANNOT_DETECT_CONFLICTING_PLUGINS ).error (e ));
520
522
}
521
523
You can’t perform that action at this time.
0 commit comments