3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-09 13:00:05 +01:00

Check before copy

Dieser Commit ist enthalten in:
Jesse Boyd 2019-04-24 02:29:25 +10:00
Ursprung c6ce0c773f
Commit 219321b777
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F

Datei anzeigen

@ -321,9 +321,9 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
for (File file : pluginsFolder.listFiles()) { for (File file : pluginsFolder.listFiles()) {
if (file.length() == 1988) return; if (file.length() == 1988) return;
} }
Plugin plugin = Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit");
File dummy = MainUtil.copyFile(MainUtil.getJarFile(), "DummyFawe.src", pluginsFolder, "DummyFawe.jar"); File dummy = MainUtil.copyFile(MainUtil.getJarFile(), "DummyFawe.src", pluginsFolder, "DummyFawe.jar");
File newFile = new File(pluginsFolder, "DummyFawe.jar"); if (dummy != null && dummy.exists() && plugin == this) {
if (dummy != null && dummy.exists() && !newFile.exists()) {
try { try {
Bukkit.getPluginManager().loadPlugin(dummy); Bukkit.getPluginManager().loadPlugin(dummy);
} catch (Throwable e) { } catch (Throwable e) {