WorldGuard

WorldGuard

8M Downloads

Horse-Protection

LadyCailinBot opened this issue ยท 11 comments

commented

WORLDGUARD-3553 - Reported by LordRazen

I was wondering why you cant hurt entities on other regions but why you can steal items from horses. Is there a way to change this easily in the default-config (not in a flag since we cant put the same flag on every new region).

commented

Comment by wizjany

this seems to be a more complex issue than might first appear. a horse doesn't really belong to a region like a chest might. for comparison, chest minecarts aren't protected either.

commented

Comment by PseudoKnight

Do you think it's within WorldGuard's purview to offer a horse protection option based on the horse's owner? I've done something like this on my server (and set "ride allow" on global), but it seems to me it would be a reasonable addition to WG. Also, none of the horse plugins (last I looked) had just simple horse protection without tons of unnecessary features.

commented

Comment by LordRazen

Not sure if that counts but from my points of view it's something that would fit worldguard: keep damage from entities (already done), and keep away the possibility to take saddle, armor or chests (inventory-stuff). Riding should be possible on other regions in my opinion since if that's disabled you wont be able to ride in 99% of all parts of the server beside your own - would destroy the featuure (an config-option might be helpful here).

commented

Comment by PseudoKnight

Could allow owners of tameable mobs region bypass for entity interaction.

commented

Comment by LordRazen

Is that a suggestion for me to use WG or for you to change WG?

My suggestion would be the following: Add options for the interaction with entities which got an inventory in the config - so:
allow-horse-inventory-interact-on-region: yes/no
allow-horse-riding-start-on-region: yes/no (means you can start riding a horse. if you sit on it already it's fine)
allow-minecart-inventory-interact-on-region: yes/no
There you can set the default, because flags are no real option here if you have to work with around 2000 regions.

I can think of some more options in that way, but it makes only sence to post them if you agree with this...

commented

Comment by wizjany

veto. too many config options and too confusing.

there are literally two things going on here:

  1. riding animals in protected regions: handled by ride flag already
  2. accessing inventory of animals(+chest charts?):
  • can be either done based on owner, ignoring regions completely (works as a single config option, doesn't work for chest carts)
  • or be done based on the region the horse is in, which is a bit more dangerous since people would be able to steal things by moving the horse around if you leave it unfenced.
commented

Comment by LordRazen

2b seems the best here - inventory save based on regions.

WG protects all block-inventories by default. So if you try to open a chest it's blocked, so why not doing this for entity-inventorys, too?

commented

Comment by sk89q

I think protecting horse inventories based on who owns the horse is the best approach for horses. I'm surprised horses aren't protected already actually -- I must have missed horse inventories when I redid all the protection code a few months ago (or maybe the API wasn't quite there at the time? I dunno).

Actually, I thought all entities WERE protected because WG blocked all right clicks of entities? Was this changed?

commented

Comment by wizjany

actually that's a good point i forgot about - afaik WG still blocks entity interaction unless it's a villager.

commented

Comment by sk89q

If that's the case, we wouldn't have this report though?

Err actually we would for horses since there wouldn't be a special exception for horses. Or maybe ride is handled as "any right click" of horses... I forget

commented

Comment by wizjany

i was under the impression that was a different event...will need to look into it.