Z0rdak / Yet-Another-World-Protector

Yet Another World Protector is a server-side protection mod which allows you to protect your creations against various different events/actions of players, mobs and the environment. It was inspired by the forge mod WorldProtector and the WorldGuard plugin.
https://www.curseforge.com/minecraft/mc-mods/yawp
GNU Affero General Public License v3.0
22 stars 9 forks source link

feat: flags with granular allow and deny entries #113

Open Z0rdak opened 4 months ago

Z0rdak commented 4 months ago

Description

Many of the current request revolve around this particular feature. Its about letting region owners define flags in a way where it is possible to allow only specific blocks to be broken, specific entities to spawn or deny using of specific items in a region, etc.

On the one hand this would improve flexibility and on the other hand it creates even more work to setup it correctly.

To counter this, its important to also implement some features which give a certain level quality of life so this does not become a pain to deal with.

For this I have two proposals:

Flag flattening/overhaul in YAWP 0.0.5.0

Note

Flag <= 0.0.5.0 >= 0.0.5.0
break-blocks ✔ *
place-blocks ✔ *
scoop-fluids ✔ *
place-fluids ✔ *
ignite-explosives ✔ *
trample-farmland ✔ *
trample-farmland-player ❌ replaced by trample-farmland
trample-farmland-other ❌ replaced by trample-farmland
lightning
lightning-create-fire
lightning-hit-entity ✔ *
leaf-decay
fire-tick
walker-freeze
animal-taming ✔ * renamed to tame-entity
animal-breeding ✔ * renamed to breed-entity
animal-mounting ✔ * renamed to mount-entity
animal-unmounting ️ ✔ ✔ * renamed to unmount-entity
spawning ️ ✔ *
spawning-all ❌ replaced by spawning
spawning-monster ❌ replaced by spawning
spawning-animal ❌ replaced by spawning
spawning-villager ❌ replaced by spawning
spawning-trader ❌ replaced by spawning
spawning-slime ❌ replaced by spawning
spawning-golem ❌ replaced by spawning
spawning-xp ❌ replaced by spawning
no-flight
use-elytra ✔ renamed to elytra-flight
use-blocks ✔ *
use-entities ✔ *
use-items ✔ *
use-item-secondary ✔ *
tools-secondary ❌ renamed to use-item-secondary
strip-wood ❌ replaced by use-item-secondary
till-farmland ❌ replaced by use-item-secondary
shovel-path ❌ replaced by use-item-secondary
use-bonemeal ✔ renamed to use-fertilizer
use-container ✔ *
access-container ❌ replaced by use-container
access-enderchest ❌ replaced by use-container
enderpearl-from
enderpearl-to
enderman-teleport-from ✔ renamed to teleport-enderman
shulker-teleport-from ✔ renamed to teleport-shulker
drop-item ✔ *
drop-loot ✔ *
drop-xp ✔ *
pickup-xp
pickup-item ✔ *
item-drop ✔ renamed to drop-item
drop-loot ❌ replaced by drop-loot
drop-loot-player ❌ replaced by drop-loot
xp-drop-all ❌ replaced by drop-xp
xp-drop-player ❌ replaced by drop-xp
xp-drop-monster ❌ replaced by drop-xp
xp-drop-other ❌ replaced by drop-xp
xp-pickup ❌ renamed to pickup-xp
item-pickup ❌ renamed to pickup-item
gain-xp
gain-level
level-freeze ❌ renamed to gain-level
xp-freeze ❌ renamed to gain-xxp
knockback-players yes
no-pvp
attack-meele ✔ *
melee-players ❌ renamed to attack-meele
melee-animals ❌ replaced by attack-meele
melee-villagers ❌ replaced by attack-meele
melee-wtrader ❌ replaced by attack-meele
melee-monsters ❌ replaced by attack-meele
invincible ❌ replaced by attack-meele
fall-damage ✔ *
fall-damage-players ❌ replaced by fall-damage
fall-damage-animals ❌ replaced by fall-damage
fall-damage-villagers ❌ replaced by fall-damage
fall-damage-monsters ❌ replaced by fall-damage
exec-command ✔ *
send-message
set-spawn
sleep
spawn-portal
enter-dim
enter-portal ✔ *
use-portal ❌ renamed to enter-portal
use-portal-players ❌ replaced by enter-portal
use-portal-villagers ❌ replaced by enter-portal
use-portal-animals ❌ replaced by enter-portal
use-portal-monsters ❌ replaced by enter-portal
use-portal-minecarts ❌ replaced by enter-portal
use-portal-items ❌ replaced by enter-portal
explosions-blocks ✔ *
explosions-entities ✔ *
creeper-explosion-blocks ❌ replaced by explosions-blocks
creeper-explosion-entities ❌ replaced by explosions-entities
other-explosion-blocks ❌ replaced by explosions-blocks
other-explosion-entities ❌ replaced by explosions-entities
griefing
griefing-zombie
griefing-dragon
griefing-wither
griefing-enderman
mob-griefing ❌ renamed to griefing
zombie-destruction ❌ renamed to griefing-zombie
enderman-griefing ❌ renamed to griefing-enderman
wither-destruction ❌ renamed to griefing-wither
dragon-destruction ❌ renamed to griefing-dragon

Todos

Loose ends

Capsup commented 4 months ago

For loose ends and this functionality of flags having a hierarchy, do we know the intersection of these?

If we do, you could make it a hierarchy. So if tool-secondary covers strip-wood and is a superset, then strip-wood only applies to the block subset of this intersection.

So with tool-secondary to false but strip-wood to true, you can use tool-secondary only to those blocks that would also return true on strip-wood.