mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-28 13:45:36 +01:00
Check VS snipe material against WE blacklist
This commit is contained in:
parent
7c3ac8e362
commit
ae3981cebf
@ -24,10 +24,13 @@
|
||||
*/
|
||||
package com.thevoxelbox.voxelsniper;
|
||||
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||
import com.thevoxelbox.voxelsniper.util.VoxelList;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* @author Piotr
|
||||
@ -268,6 +271,15 @@ public class SnipeData {
|
||||
* @param voxelId the voxelId to set
|
||||
*/
|
||||
public final void setVoxelId(final int voxelId) {
|
||||
if (WorldEdit.getInstance().getConfiguration().disallowedBlocks.contains(voxelId)) {
|
||||
if (owner != null) {
|
||||
Player plr = owner.getPlayer();
|
||||
if (plr != null) {
|
||||
plr.sendMessage(ChatColor.RED + "You are not allowed to use '" + voxelId + "'");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.voxelId = voxelId;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user