mirror of
https://github.com/taoneill/war.git
synced 2024-11-13 05:54:31 +01:00
Make sure the selection is a cuboid
This commit is contained in:
parent
21688ba4d0
commit
5c954a19b4
@ -1,6 +1,7 @@
|
||||
package com.tommytony.war.command;
|
||||
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldedit.bukkit.selections.CuboidSelection;
|
||||
import com.sk89q.worldedit.bukkit.selections.Selection;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -32,7 +33,7 @@ public class SetZoneCommand extends AbstractZoneMakerCommand {
|
||||
if (War.war.getServer().getPluginManager().isPluginEnabled("WorldEdit")) {
|
||||
WorldEditPlugin worldEdit = (WorldEditPlugin) War.war.getServer().getPluginManager().getPlugin("WorldEdit");
|
||||
Selection selection = worldEdit.getSelection(player);
|
||||
if (selection != null) {
|
||||
if (selection != null && selection instanceof CuboidSelection) {
|
||||
Location min = selection.getMinimumPoint();
|
||||
Location max = selection.getMaximumPoint();
|
||||
ZoneSetter setter = new ZoneSetter(player, this.args[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user