WorldGuard Block Restricter
Description
WorldGuard Block Restricter adds two (six) flags to WorldGuard regions:
- deny-blocks: a list of blocks that are not allowed to be placed or destroyed in this region
- allow-blocks: a list of blocks that are allowed to be placed and destroyed (overwrites deny-blocks)
- from 2.0 on these flags will be available too:
- deny-place: only deny placing the specified blocks, but not breaking them
- allow-place: overwrite blocks specified by "deny-place"
- deny-break: only deny breaking the specified blocks, but not placing them
- allow-break: overwrite blocks specified by "deny-break"
It requires WorldGuard Custom Flags.
Usage
Simply use these flag as any other WorldGuard flag:
/region flag restriction deny-blocks obsidian, cobblestone
You can also use "any" to block any block placement/destruction. This is usefull for whitelisting, because allow-blocks will overwrite this.
/region flag only-dirt deny-blocks any
/region flag only-dirt allow-blocks dirt
From version 1.7 on you can also use block/item ids.
Click here for some other plugins using WorldGuard Custom Flags.
Permissions
- wgblockrestricter.ignore:
- allows players to ignore block restrictions
Problems ?
If you have problems with this plugin read the F.A.Q.. If this did not help you, you can receive help here.
any way i could block quarrys with this?
@der_mewin
Done, let me know what you find. Thanks.
@SmashboxGaming
http://dev.bukkit.org/server-mods/worldguard-custom-flags/forum/problems/
@der_mewin
http://paste.thezomg.com/5880/46532313/
@Deathrey
Indeed :/
@der_mewin
It appears that it does not. neither emerald block nor emerald ore are listed in BlockMaterial class.
@Seremoth
It should have that :o .
Great plugin but it would be even greater if it had emerald block support!!!
@der_mewin
Ok thanks! I will try that. I and I will post on the forum if something happens ^_^
@MrCh0ww
Can you give instructions on how to install? I know where to put the jar but not the .sql file. I tried putting both in the plugins folder but when I'm actually on the server, it doesn't exist. HELP ME PLEASE?!!
Hey, this is a really neat plugin :D. I was wondering if you could recompile this for Java6? Thanks it says unsupported major minor version. Thanks!
EDIT nvm ill just reompile it
@enetocs
It has nothing to do with 1.4.2 . It's a known bug and will be fixed soon. To stop it now just set any flag for the
__global__
region.I got that error on 1.4.2 version:
[SEVERE] Could not pass event BlockPlaceEvent to WGBlockRestricter v1.1 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:341) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(CraftEventFactory.java:99) at net.minecraft.server.ItemBlock.interactWith(ItemBlock.java:76) at net.minecraft.server.ItemStack.placeItem(ItemStack.java:87) at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:382) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:650) at net.minecraft.server.Packet15Place.handle(SourceFile:58) at net.minecraft.server.NetworkManager.b(NetworkManager.java:282) at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:111) at net.minecraft.server.ServerConnection.b(SourceFile:35) at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:569) at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:215) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:486) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.ThreadServerApplication.run(SourceFile:818) Caused by: java.lang.NullPointerException at com.mewin.WGBlockRestricter.Utils.blockAllowedInRegion(Utils.java:106) at com.mewin.WGBlockRestricter.Utils.blockAllowedAtLocation(Utils.java:93) at com.mewin.WGBlockRestricter.BlockPlaceListener.onBlockPlace(BlockPlaceListener.java:40) at sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:339) ... 18 more
Is it possible to control place AND break blocks with this? It's helpful to deny placing blocks, but it would compete the plugin if breaking could be controlled as well. For example, a shared farm... Players can only break crops, plant seeds, and till soil, but not dig the soil.
@Kiak
Do you still have that problem? I can't reproduce it.
Just to be really specific
I got my previous error by global deny of Ironore and goldore
Then i tried placing those INSIDE another NO BUILD region.. that's when it threw the exception.
@der_mewin
Sweet bro, il try this out today and let you know if there's any issues :)
Thanks again. Great worldguard addons
@Kiak
Should be fixed in the new version. I tried it and it didn't give me any error.