mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-19 15:03:54 +00:00
Fix disallowedBlocks
This commit is contained in:
@ -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(BlockTypes.getFromStateId(voxelId).getId())) {
|
||||
if (WorldEdit.getInstance().getConfiguration().checkDisallowedBlocks(BlockTypes.getFromStateId(voxelId).getDefaultState())) {
|
||||
if (owner != null) {
|
||||
Player plr = owner.getPlayer();
|
||||
if (plr != null) {
|
||||
|
@ -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.getId())) {
|
||||
if(!player.hasPermission("voxelsniper.ignorelimitations") && WorldEdit.getInstance().getConfiguration().checkDisallowedBlocks(weType.getDefaultState())) {
|
||||
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.getId())) {
|
||||
if(!player.hasPermission("voxelsniper.ignorelimitations") && WorldEdit.getInstance().getConfiguration().checkDisallowedBlocks(weType.getDefaultState())) {
|
||||
player.sendMessage("You are not allowed to use " + weType + ".");
|
||||
return true;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user