51 Zeilen
2.7 KiB
Diff
51 Zeilen
2.7 KiB
Diff
Index: src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
IDEA additional info:
|
|
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
|
<+>UTF-8
|
|
===================================================================
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java (revision 03ee2524f7fdb74627bf27516438742df0cf3c8d)
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java (date 1618245161390)
|
|
@@ -358,14 +358,35 @@
|
|
|
|
if (pluginFolder.exists()) {
|
|
Plugin[] plugins = pluginManager.loadPlugins(pluginFolder);
|
|
+ List<Thread> threads = new ArrayList<>(); //Steamwar
|
|
for (Plugin plugin : plugins) {
|
|
- try {
|
|
- String message = String.format("Loading %s", plugin.getDescription().getFullName());
|
|
- plugin.getLogger().info(message);
|
|
- plugin.onLoad();
|
|
- } catch (Throwable ex) {
|
|
- Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, ex.getMessage() + " initializing " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
|
+ //Steamwar Start
|
|
+ /*try {
|
|
+ String message = String.format("Loading %s", plugin.getDescription().getFullName());
|
|
+ plugin.getLogger().info(message);
|
|
+ plugin.onLoad();
|
|
+ } catch (Throwable ex) {
|
|
+ Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, ex.getMessage() + " initializing " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
|
+ }*/
|
|
+ Thread thread = new Thread(() -> {
|
|
+ try {
|
|
+ String message = String.format("Loading %s", plugin.getDescription().getFullName());
|
|
+ plugin.getLogger().info(message);
|
|
+ plugin.onLoad();
|
|
+ } catch (Throwable ex) {
|
|
+ Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, ex.getMessage() + " initializing " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
|
+ }
|
|
+ });
|
|
+ thread.start();
|
|
+ threads.add(thread);
|
|
+ }
|
|
+ for (Thread thread : threads) {
|
|
+ try {
|
|
+ thread.join();
|
|
+ } catch (InterruptedException e) {
|
|
+ Thread.currentThread().interrupt();
|
|
}
|
|
+ //Steamwar End
|
|
}
|
|
} else {
|
|
pluginFolder.mkdir();
|