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:
Ursprung
c6ce0c773f
Commit
219321b777
@ -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) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren