Make sure the plugins folder actually exists before iterating
Dieser Commit ist enthalten in:
Ursprung
8e8cf54ddd
Commit
39998eedf8
@ -501,6 +501,8 @@ public class ProtocolLibrary extends JavaPlugin {
|
|||||||
// The plugin folder isn't always plugins/
|
// The plugin folder isn't always plugins/
|
||||||
File pluginFolder = getDataFolder().getParentFile();
|
File pluginFolder = getDataFolder().getParentFile();
|
||||||
|
|
||||||
|
File[] candidates = pluginFolder.listFiles();
|
||||||
|
if (candidates != null) {
|
||||||
for (File candidate : pluginFolder.listFiles()) {
|
for (File candidate : pluginFolder.listFiles()) {
|
||||||
if (candidate.isFile() && !candidate.equals(loadedFile)) {
|
if (candidate.isFile() && !candidate.equals(loadedFile)) {
|
||||||
Matcher match = ourPlugin.matcher(candidate.getName());
|
Matcher match = ourPlugin.matcher(candidate.getName());
|
||||||
@ -516,6 +518,7 @@ public class ProtocolLibrary extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO This shows [ProtocolLib] and [ProtocolLibrary] in the message
|
// TODO This shows [ProtocolLib] and [ProtocolLibrary] in the message
|
||||||
reporter.reportWarning(this, Report.newBuilder(REPORT_CANNOT_DETECT_CONFLICTING_PLUGINS).error(e));
|
reporter.reportWarning(this, Report.newBuilder(REPORT_CANNOT_DETECT_CONFLICTING_PLUGINS).error(e));
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren