WorldGuard

WorldGuard

8M Downloads

New flag suggestions.

LadyCailinBot opened this issue ยท 6 comments

commented

WORLDGUARD-3711 - Reported by mibby

Few new flag suggestions that I would love to see integrated into WorldGuard in some way, shape, or form.

  • Instabreak. Allow toggling whether blocks can be instantly broken inside a region.
  • Block-drop. Complimentary to the currently existing item-drop and exp-drops flags, be able to specify whether a block drops in a region when broken. Especially useful with instabreak flag to prevent drops with instantly broken blocks, or just not drop any block by default when blocks instantly break?
  • Deny-blocks. Be able to specify a list of blocks (either by block/item ID, name, or all|any) that are not allowed to be placed or destroyed in a region.
  • Allow-blocks. Be able to specify a list of blocks (either by block/item ID, name, or all|any) that are allowed to be placed and destroyed (overwrites deny-blocks).
  • Deny-place. Only deny placing of specified blocks, but not breaking them.
  • Allow-place. Overwrite blocks specified by "deny-place".
  • Deny-break. Only deny breaking of specified blocks, but not placing them.
  • Allow-break. Overwrite blocks specified by "deny-break".
  • Fly. Complimentary to the currently existing invincible flag, be able to specify whether players are allowed to fly when entering a region by toggling fly state on or off when someone enters the region. Or if the high-frequency-flags setting is enabled (for player movement tracking?), force deny fly state / set them on the ground if they try to enable it and fly within the region?

Some example uses.

/region flag restriction deny-blocks obsidian, cobblestone
This would deny obsidian and cobble from being either placed or destroyed in the region.

/region flag only-dirt deny-blocks any
This would deny placement and destruction for all blocks in the region, effectively turning on 'whitelist' mode.
/region flag only-dirt allow-blocks dirt
This would 'whitelist' dirt from the deny blocks list, allowing only the placement and destruction of dirt in the region.

/region flag protectedregion deny-break any
/region flag protectedregion deny-place any
/region flag protectedregion allow-break sign
/region flag protectedregion allow-place sign
Denies place/break of all blocks but a sign. So players can't edit a region but can place and break signs within it.

/region flag event instabreak allow
/region flag event deny-break any
/region flag event allow-break wool
Would flag the region to allow instant breaking of only wool within the region. Alternatively, specify what block can be broken with 'instabreak '?

commented

Comment by wizjany

the idea is not to add anything else to worldguard at this point, but allow 3rd party plugins to add a million and one useless flags so admins who want them can have them.

commented

Comment by mibby

@wizjany Is there any documentation for custom flag creation? As an old, no longer maintained custom flag plugin broke recently due to a WG change or MC 1.10. =/ Highly doubt the developer would make a return.


[04:00:26] [Server thread/INFO]: [WGInstabreakFlag] Enabling WGInstabreakFlag v1.0
[04:00:26] [Server thread/ERROR]: Error occurred while enabling WGInstabreakFlag v1.0 (Is it up to date?)
java.lang.IllegalArgumentException: No enum constant com.sk89q.worldguard.protection.flags.StateFlag.State.allow
	at java.lang.Enum.valueOf(Enum.java:238) ~[?:1.8.0_92]
	at com.sk89q.worldguard.protection.flags.StateFlag$State.valueOf(StateFlag.java:33) ~[?:?]
	at com.mewin.WGCustomFlags.data.YAMLSaveHandler.castValue(YAMLSaveHandler.java:127) ~[?:?]
	at com.mewin.WGCustomFlags.data.YAMLSaveHandler.loadFlagsForWorld(YAMLSaveHandler.java:104) ~[?:?]
	at com.mewin.WGCustomFlags.WGCustomFlagsPlugin.loadFlagsForWorld(WGCustomFlagsPlugin.java:184) ~[?:?]
	at com.mewin.WGCustomFlags.WGCustomFlagsPlugin.loadAllWorlds(WGCustomFlagsPlugin.java:171) ~[?:?]
	at com.mewin.WGCustomFlags.FlagManager.addCustomFlag(FlagManager.java:70) ~[?:?]
	at com.mewin.WGCustomFlags.WGCustomFlagsPlugin.addCustomFlag(WGCustomFlagsPlugin.java:229) ~[?:?]
	at de.omr.wgibf.listener.BlockDamageListener.<init>(BlockDamageListener.java:47) ~[?:?]
	at de.omr.wgibf.WGInstabreakFlagPlugin.onEnable(WGInstabreakFlagPlugin.java:49) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) ~[patched_1.10.jar:git-Paper-784]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:319) [patched_1.10.jar:git-Paper-784]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.10.jar:git-Paper-784]
	at org.bukkit.craftbukkit.v1_10_R1.CraftServer.loadPlugin(CraftServer.java:358) [patched_1.10.jar:git-Paper-784]
	at org.bukkit.craftbukkit.v1_10_R1.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.10.jar:git-Paper-784]
	at net.minecraft.server.v1_10_R1.MinecraftServer.t(MinecraftServer.java:414) [patched_1.10.jar:git-Paper-784]
	at net.minecraft.server.v1_10_R1.MinecraftServer.l(MinecraftServer.java:379) [patched_1.10.jar:git-Paper-784]
	at net.minecraft.server.v1_10_R1.MinecraftServer.a(MinecraftServer.java:333) [patched_1.10.jar:git-Paper-784]
	at net.minecraft.server.v1_10_R1.DedicatedServer.init(DedicatedServer.java:274) [patched_1.10.jar:git-Paper-784]
	at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:580) [patched_1.10.jar:git-Paper-784]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_92]
[04:00:26] [Server thread/INFO]: [WGInstabreakFlag] Disabling WGInstabreakFlag v1.0
commented

Comment by wizjany

not yet

commented

Comment by wizjany

in general, things like WGCustomFlags are unnecessary now though, as the plugins that add the flags should interface directly with WG

commented

Comment by mibby

So would WG detect the flag injection or would it still require a rewrite to hook into the API?

commented

Comment by wizjany

no idea what you are asking.
wginstabreakflagplugin would need to use worldguard's api instead of wgcustomflags'