2020-12-27 21:25:08 +01:00
|
|
|
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
|
2021-04-12 19:54:42 +02:00
|
|
|
--- 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 @@
|
2020-12-27 21:25:08 +01:00
|
|
|
|
|
|
|
if (pluginFolder.exists()) {
|
|
|
|
Plugin[] plugins = pluginManager.loadPlugins(pluginFolder);
|
2021-04-12 19:54:42 +02:00
|
|
|
+ List<Thread> threads = new ArrayList<>(); //Steamwar
|
2020-12-27 21:25:08 +01:00
|
|
|
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);
|
2021-04-12 19:54:42 +02:00
|
|
|
+ //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);
|
|
|
|
+ }*/
|
2020-12-27 21:25:08 +01:00
|
|
|
+ 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);
|
|
|
|
+ }
|
2021-04-12 19:54:42 +02:00
|
|
|
+ for (Thread thread : threads) {
|
2020-12-27 21:25:08 +01:00
|
|
|
+ try {
|
|
|
|
+ thread.join();
|
|
|
|
+ } catch (InterruptedException e) {
|
|
|
|
+ Thread.currentThread().interrupt();
|
|
|
|
}
|
2021-04-12 19:54:42 +02:00
|
|
|
+ //Steamwar End
|
2020-12-27 21:25:08 +01:00
|
|
|
}
|
|
|
|
} else {
|
2021-04-12 19:54:42 +02:00
|
|
|
pluginFolder.mkdir();
|