mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-03 16:13:34 +01:00
Move voxelsniper stuff to its own jar
(untested)
This commit is contained in:
parent
0849948f77
commit
2f76cb59e3
@ -1,15 +1,6 @@
|
|||||||
package com.boydti.fawe.bukkit;
|
package com.boydti.fawe.bukkit;
|
||||||
|
|
||||||
import com.boydti.fawe.Fawe;
|
|
||||||
import com.boydti.fawe.object.FaweCommand;
|
|
||||||
import com.boydti.fawe.object.FawePlayer;
|
|
||||||
import com.boydti.fawe.object.FaweQueue;
|
import com.boydti.fawe.object.FaweQueue;
|
||||||
import com.thevoxelbox.voxelsniper.SnipeData;
|
|
||||||
import com.thevoxelbox.voxelsniper.Sniper;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.command.Command;
|
|
||||||
import org.bukkit.command.CommandSender;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
public abstract class ABukkitMain extends JavaPlugin {
|
public abstract class ABukkitMain extends JavaPlugin {
|
||||||
@ -17,38 +8,6 @@ public abstract class ABukkitMain extends JavaPlugin {
|
|||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
FaweBukkit imp = new FaweBukkit(this);
|
FaweBukkit imp = new FaweBukkit(this);
|
||||||
try {
|
|
||||||
SnipeData.inject();
|
|
||||||
Sniper.inject();
|
|
||||||
// Forward the commands so //p and //d will work
|
|
||||||
imp.setupCommand("/p", new FaweCommand("voxelsniper.sniper") {
|
|
||||||
@Override
|
|
||||||
public boolean execute(FawePlayer fp, String... args) {
|
|
||||||
Player player = (Player) fp.parent;
|
|
||||||
return (Bukkit.getPluginManager().getPlugin("VoxelSniper")).onCommand(player, new Command("p") {
|
|
||||||
@Override
|
|
||||||
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}, null, args);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
imp.setupCommand("/d", new FaweCommand("voxelsniper.sniper") {
|
|
||||||
@Override
|
|
||||||
public boolean execute(FawePlayer fp, String... args) {
|
|
||||||
Player player = (Player) fp.parent;
|
|
||||||
return (Bukkit.getPluginManager().getPlugin("VoxelSniper")).onCommand(player, new Command("d") {
|
|
||||||
@Override
|
|
||||||
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}, null, args);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Fawe.debug("Injected VoxelSniper classes");
|
|
||||||
} catch (Throwable ignore) {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract FaweQueue getQueue(String world);
|
public abstract FaweQueue getQueue(String world);
|
||||||
|
32
favs/build.gradle
Normal file
32
favs/build.gradle
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
dependencies {
|
||||||
|
compile project(':bukkit0')
|
||||||
|
compile 'org.bukkit.craftbukkit:CraftBukkit:1.8.8'
|
||||||
|
}
|
||||||
|
|
||||||
|
processResources {
|
||||||
|
from('src/main/resources') {
|
||||||
|
include 'plugin.yml'
|
||||||
|
expand(
|
||||||
|
name: project.parent.name,
|
||||||
|
version: project.parent.version
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'com.github.johnrengelman.shadow'
|
||||||
|
// We only want the shadow jar produced
|
||||||
|
jar.enabled = false
|
||||||
|
shadowJar {
|
||||||
|
dependencies {
|
||||||
|
include(dependency(':bukkit0'))
|
||||||
|
include(dependency(':core'))
|
||||||
|
}
|
||||||
|
archiveName = "FastAsyncVoxelSniper-${project.name}-${parent.version}.jar"
|
||||||
|
destinationDir = file '../target'
|
||||||
|
}
|
||||||
|
shadowJar.doLast {
|
||||||
|
task ->
|
||||||
|
ant.checksum file: task.archivePath
|
||||||
|
}
|
||||||
|
|
||||||
|
build.dependsOn(shadowJar);
|
50
favs/src/main/java/com/boydti/fawe/bukkit/favs/Favs.java
Normal file
50
favs/src/main/java/com/boydti/fawe/bukkit/favs/Favs.java
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package com.boydti.fawe.bukkit.favs;
|
||||||
|
|
||||||
|
import com.boydti.fawe.Fawe;
|
||||||
|
import com.boydti.fawe.object.FaweCommand;
|
||||||
|
import com.boydti.fawe.object.FawePlayer;
|
||||||
|
import com.thevoxelbox.voxelsniper.SnipeData;
|
||||||
|
import com.thevoxelbox.voxelsniper.Sniper;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.command.Command;
|
||||||
|
import org.bukkit.command.CommandSender;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
public class Favs extends JavaPlugin {
|
||||||
|
@Override
|
||||||
|
public void onEnable() {
|
||||||
|
try {
|
||||||
|
SnipeData.inject();
|
||||||
|
Sniper.inject();
|
||||||
|
// Forward the commands so //p and //d will work
|
||||||
|
Fawe.imp().setupCommand("/p", new FaweCommand("voxelsniper.sniper") {
|
||||||
|
@Override
|
||||||
|
public boolean execute(FawePlayer fp, String... args) {
|
||||||
|
Player player = (Player) fp.parent;
|
||||||
|
return (Bukkit.getPluginManager().getPlugin("VoxelSniper")).onCommand(player, new Command("p") {
|
||||||
|
@Override
|
||||||
|
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}, null, args);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Fawe.imp().setupCommand("/d", new FaweCommand("voxelsniper.sniper") {
|
||||||
|
@Override
|
||||||
|
public boolean execute(FawePlayer fp, String... args) {
|
||||||
|
Player player = (Player) fp.parent;
|
||||||
|
return (Bukkit.getPluginManager().getPlugin("VoxelSniper")).onCommand(player, new Command("d") {
|
||||||
|
@Override
|
||||||
|
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}, null, args);
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Fawe.debug("Injected VoxelSniper classes");
|
||||||
|
} catch (Throwable ignore) {}
|
||||||
|
}
|
||||||
|
}
|
@ -2,10 +2,9 @@ package com.thevoxelbox.voxelsniper;
|
|||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockState;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds {@link BlockState}s that can be later on used to reset those block
|
* Holds {@link org.bukkit.block.BlockState}s that can be later on used to reset those block
|
||||||
* locations back to the recorded states.
|
* locations back to the recorded states.
|
||||||
*/
|
*/
|
||||||
public class Undo {
|
public class Undo {
|
17
favs/src/main/resources/plugin.yml
Normal file
17
favs/src/main/resources/plugin.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: FastAsyncVoxelSniper
|
||||||
|
main: com.boydti.fawe.bukkit.favs.Favs
|
||||||
|
version: ${version}
|
||||||
|
description: Fast Async VoxelSniper
|
||||||
|
authors: [Empire92]
|
||||||
|
loadbefore: [WorldEdit,VoxelSniper]
|
||||||
|
load: STARTUP
|
||||||
|
database: false
|
||||||
|
softdepend: [FastAsyncWorldEdit]
|
||||||
|
#softdepend: [WorldGuard, PlotSquared, MCore, Factions, GriefPrevention, Residence, Towny, PlotMe, PreciousStones]
|
||||||
|
commands:
|
||||||
|
'/p':
|
||||||
|
description: VoxelSniper perform command
|
||||||
|
aliases: [perform,/perform]
|
||||||
|
'/d':
|
||||||
|
description: VoxelSniper default command
|
||||||
|
aliases: [default,/default]
|
@ -1,3 +1,3 @@
|
|||||||
rootProject.name = 'FastAsyncWorldEdit'
|
rootProject.name = 'FastAsyncWorldEdit'
|
||||||
|
|
||||||
include 'core', 'bukkit0', 'bukkit1710', 'bukkit18', 'bukkit19', 'bukkit110', 'forge1710', 'forge189', 'forge194', 'forge110'
|
include 'core', 'bukkit0', 'bukkit1710', 'bukkit18', 'bukkit19', 'bukkit110', 'forge1710', 'forge189', 'forge194', 'forge110', 'favs'
|
||||||
|
Loading…
Reference in New Issue
Block a user