mirror of
https://github.com/taoneill/war.git
synced 2025-01-03 06:17:33 +01:00
Dumb WorldEdit unstable API
Now works for 7.0.0-beta-01
This commit is contained in:
parent
a0174935fe
commit
99b6bdb3dd
10
war/pom.xml
10
war/pom.xml
@ -134,15 +134,9 @@
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<groupId>com.tommytony</groupId>
|
||||
<artifactId>worldedit-bukkit</artifactId>
|
||||
<version>7.0.0-20181118.055910-28</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sk89q.worldedit</groupId>
|
||||
<artifactId>worldedit-core</artifactId>
|
||||
<version>7.0.0-20181118.055910-28</version>
|
||||
<version>7.0.0-beta-01</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -5,7 +5,6 @@ import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import com.sk89q.worldedit.bukkit.BukkitPlayer;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.tommytony.war.War;
|
||||
@ -55,11 +54,9 @@ public class Compat {
|
||||
try {
|
||||
Region selection = session.getSelection(wp.getWorld());
|
||||
if (selection instanceof CuboidRegion) {
|
||||
BlockVector3 min = selection.getMinimumPoint();
|
||||
BlockVector3 max = selection.getMaximumPoint();
|
||||
return new BlockPair(
|
||||
player.getWorld().getBlockAt(min.getBlockX(), min.getBlockY(), min.getBlockZ()),
|
||||
player.getWorld().getBlockAt(max.getBlockX(), max.getBlockY(), max.getBlockZ())
|
||||
player.getWorld().getBlockAt(selection.getMinimumPoint().getBlockX(), selection.getMinimumPoint().getBlockY(), selection.getMinimumPoint().getBlockZ()),
|
||||
player.getWorld().getBlockAt(selection.getMaximumPoint().getBlockX(), selection.getMaximumPoint().getBlockY(), selection.getMaximumPoint().getBlockZ())
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user