Finish removal of PlayerDirection, and partially added diagonal support back to commands. (Other minor changes to WorldEdit-Sponge and FAVS)

This commit is contained in:
Matthew Miller
2018-11-12 12:38:13 +10:00
committed by IronApollo
parent 13bf8429ce
commit f3c633582e
18 changed files with 123 additions and 148 deletions

View File

@ -272,7 +272,7 @@ public class SnipeData {
* @param voxelId the voxelId to set
*/
public final void setVoxelId(final int voxelId) {
if (WorldEdit.getInstance().getConfiguration().disallowedBlocks.contains(voxelId)) {
if (WorldEdit.getInstance().getConfiguration().disallowedBlocks.contains(BlockTypes.getFromStateId(voxelId).getId())) {
if (owner != null) {
Player plr = owner.getPlayer();
if (plr != null) {

View File

@ -55,7 +55,7 @@ public class VoxelVoxelCommand extends VoxelCommand {
Material blockType = block.getType();
BlockType weType = BukkitAdapter.adapt(blockType);
if(!player.hasPermission("voxelsniper.ignorelimitations") && WorldEdit.getInstance().getConfiguration().disallowedBlocks.contains(weType)) {
if(!player.hasPermission("voxelsniper.ignorelimitations") && WorldEdit.getInstance().getConfiguration().disallowedBlocks.contains(weType.getId())) {
player.sendMessage("You are not allowed to use " + blockType.name() + ". (WorldEdit config.yml)");
return true;
}
@ -68,7 +68,7 @@ public class VoxelVoxelCommand extends VoxelCommand {
} else {
BlockType weType = BlockTypes.parse(args[0]);
if(weType != null) {
if(!player.hasPermission("voxelsniper.ignorelimitations") && WorldEdit.getInstance().getConfiguration().disallowedBlocks.contains(weType)) {
if(!player.hasPermission("voxelsniper.ignorelimitations") && WorldEdit.getInstance().getConfiguration().disallowedBlocks.contains(weType.getId())) {
player.sendMessage("You are not allowed to use " + weType + ".");
return true;
} else {