mirror of
https://github.com/YouHaveTrouble/BlockEdit.git
synced 2026-06-29 21:46:19 +00:00
cleanup, refactors, hopefully fix for all boundingbox issues
This commit is contained in:
@@ -10,7 +10,6 @@ import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.BoundingBox;
|
||||
import org.bukkit.util.StringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -52,12 +51,12 @@ public class SetCommand extends Command {
|
||||
}
|
||||
BlockData blockData = material.createBlockData();
|
||||
BEPlayer bePlayer = BEPlayer.getByPlayer(player);
|
||||
BoundingBox selection = bePlayer.getSelection();
|
||||
Selection selection = bePlayer.getSelection();
|
||||
if (selection == null) {
|
||||
player.sendMessage(Component.text("You need to select 2 points to do this"));
|
||||
return true;
|
||||
}
|
||||
BlockEditAPI.runOperation(new Selection(selection, bePlayer.getSelectionWorld()), 1, new SetOperation(blockData));
|
||||
BlockEditAPI.runOperation(selection, 1, new SetOperation(blockData));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user