update WE/VS auto-install jars
This commit is contained in:
parent
7f01ac7790
commit
e6e1a3c45f
@ -105,7 +105,7 @@ public class FaweBukkit implements IFawe, Listener {
|
||||
if (Bukkit.getPluginManager().getPlugin("WorldEdit") == null) {
|
||||
try {
|
||||
File output = new File(getDirectory().getParentFile(), "WorldEdit.jar");
|
||||
URL worldEditUrl = new URL("http://builds.enginehub.org/job/worldedit/9672/download/worldedit-bukkit-6.1.7-SNAPSHOT-dist.jar");
|
||||
URL worldEditUrl = new URL("http://builds.enginehub.org/job/worldedit/9819/download/worldedit-bukkit-6.1.8-SNAPSHOT-dist.jar");
|
||||
try (ReadableByteChannel rbc = Channels.newChannel(worldEditUrl.openStream())) {
|
||||
try (FileOutputStream fos = new FileOutputStream(output)) {
|
||||
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
|
||||
|
@ -1,10 +1,16 @@
|
||||
package com.boydti.fawe.bukkit.favs;
|
||||
|
||||
import com.boydti.fawe.Fawe;
|
||||
import com.boydti.fawe.bukkit.BukkitCommand;
|
||||
import com.boydti.fawe.object.FaweCommand;
|
||||
import com.boydti.fawe.object.FawePlayer;
|
||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||
import com.thevoxelbox.voxelsniper.Sniper;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.channels.Channels;
|
||||
import java.nio.channels.ReadableByteChannel;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -15,6 +21,25 @@ public class Favs extends JavaPlugin {
|
||||
@Override
|
||||
public void onEnable() {
|
||||
try {
|
||||
if (Bukkit.getPluginManager().getPlugin("VoxelSniper") == null) {
|
||||
try {
|
||||
File output = new File(this.getDataFolder().getParentFile(), "VoxelSniper.jar");
|
||||
URL worldEditUrl = new URL("https://addons-origin.cursecdn.com/files/912/511/VoxelSniper-5.171.0-SNAPSHOT.jar");
|
||||
try (ReadableByteChannel rbc = Channels.newChannel(worldEditUrl.openStream())) {
|
||||
try (FileOutputStream fos = new FileOutputStream(output)) {
|
||||
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
|
||||
}
|
||||
}
|
||||
Bukkit.getPluginManager().loadPlugin(output);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
Fawe.debug("====== INSTALL VOXELSNIPER ======");
|
||||
Fawe.debug("FAVS requires VoxelSniper to function correctly");
|
||||
Fawe.debug("Info: https://github.com/boy0001/FastAsyncWorldedit/releases/");
|
||||
Fawe.debug("===============================");
|
||||
return;
|
||||
}
|
||||
}
|
||||
SnipeData.inject();
|
||||
Sniper.inject();
|
||||
// Forward the commands so //p and //d will work
|
||||
|
Loading…
Reference in New Issue
Block a user