mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-16 17:16:11 +00:00
Check before copy
This commit is contained in:
parent
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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user