tastybento / ASkyBlock-Bugs-N-Features

Bug Tracker for ASkyBlock and AcidIsland - note team is 100% working on next version BentoBox
6 stars 3 forks source link

Door permissions do not protect iron doors. #623

Open ComradeEcho opened 6 years ago

ComradeEcho commented 6 years ago

IslandGuard.java does not protect IRON_DOOR when dealing with SettingsFlag.DOOR

This results in Iron doors able to be broken, while wood doors are protected.

Additionally, wood trap doors are protected, but iron trap doors are not protected, and can be broken with block breaking permissions enabled.

I'm not sure if iron doors and trap doors were excluded intentionally, or if it's an oversight that needs fixed. I'd be interested to know.

tastybento commented 6 years ago

The SettingsFlag.DOOR is for the use of doors and not to do with breaking them. As iron doors and iron trap doors have to be opened by using a button or Redstone event, they are protected from being opened by the player's island design (and whether buttons/levers etc. are protected or not).

ComradeEcho commented 6 years ago

I'm not sure if this is the case with a server running just the latest askyblock, but here's the situation I'm running into on an existing skyblock server

block breaking: enabled doors: disabled redstone: disabled pressure plates: disabled


wood doors can not be broken or opened. Iron doors can not be opened, but can be broken with a pick

I'm expecting that with block breaking enabled, any type of block with disabled permissions should be protected from being broken, and iron doors / trap doors were not inclided in those permissions

Hope that is more clear.

also, here's a video showing what I'm experiencing https://www.youtube.com/watch?v=-rBNwrJek1U&feature=youtu.be

tastybento commented 6 years ago

Yes, you are correct. The DOOR flag is incorrectly protecting the wooden doors. This is because the code does not differentiate between the left-click hit with a right click open/close.

Note that this just means that if it was working correctly, visitors would be able to destroy doors. In other words, having the island settings of:

block breaking: enabled doors: disabled

does not make sense because if door use is disabled, a visitor could just destroy it to get through.

It is a bug and I'll plan to fix it, but is this a realistic scenario?

tastybento commented 6 years ago

Fixed binary is here: https://github.com/tastybento/askyblock/releases/tag/V3.0.8.3

Thanks for the report!

ComradeEcho commented 6 years ago

Additionally: Enchanting tables, armour stands, beds, redstone wire, and some other redstone related items like pistons/lanterns/torches can be broken when block breaking permissions are enabled, each respective category is disabled.

Furnaces, chests, hoppers, wood doors, gates, anvils, crafting tables, jukeboxes, comparators, repeaters are all protected and work as expected.

I'm wondering if there needs to be a general re-write update of islandguard, with the idea of "block breaking enabled, with specific things restricted"

I'm currently building an island with a public cobble-gen for anyone to use, built out of blocks with "denied permissions", and that's where I'm coming across these inconsistencies in how block-breaking permission interacts with the permissions of other items, though I understand this is a very niche case, and almost nobody will ever enable block breaking.

If this is something that will be addressed fully, sign and item frame permissions would be helpful. I'm struggling to leave signs or label shops in a way that's can't be broken, though that probably belongs in a feature request. - I just realized, this could be tricky given the fact those can be broken by breaking the object they're attached to. oh well

I appreciate your responsiveness.

tastybento commented 6 years ago

Yes, we are doing a complete rewrite with BSkyBlock.

To handle all these items will need some work.

You can set the permissions for the island specifically, so you should be able to adjust the settings for this special island. Just add all the settings flags to the island protection section in config.yml, use the GUI to set them and then remove them when you are done.