3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01:00

Don't load dummy twice

Dieser Commit ist enthalten in:
Jesse Boyd 2019-04-23 23:30:43 +10:00
Ursprung c45d4b58cc
Commit 02a6caa3ab
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F

Datei anzeigen

@ -318,19 +318,19 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
{ {
File pluginsFolder = MainUtil.getJarFile().getParentFile(); File pluginsFolder = MainUtil.getJarFile().getParentFile();
for (File file : pluginsFolder.listFiles()) { for (File file : pluginsFolder.listFiles()) {
if (file.length() == 1073) return; if (file.length() == 1988) return;
} }
File dummy = MainUtil.copyFile(MainUtil.getJarFile(), "DummyFawe.src", pluginsFolder, "DummyFawe.jar"); File dummy = MainUtil.copyFile(MainUtil.getJarFile(), "DummyFawe.src", pluginsFolder, "DummyFawe.jar");
if (dummy != null && dummy.exists()) { if (dummy != null && dummy.exists() && Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") == null) {
try { try {
Bukkit.getPluginManager().loadPlugin(dummy); Bukkit.getPluginManager().loadPlugin(dummy);
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
} }
}
getLogger().info("Please restart the server if you have any plugins which depend on FAWE."); getLogger().info("Please restart the server if you have any plugins which depend on FAWE.");
} }
} }
}
private void fail(Runnable run, String message) { private void fail(Runnable run, String message) {
try { try {