Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Glitch for players without permission to break blocks. #183

Open
eVisper opened this issue Apr 22, 2021 · 1 comment
Open

Glitch for players without permission to break blocks. #183

eVisper opened this issue Apr 22, 2021 · 1 comment

Comments

@eVisper
Copy link

eVisper commented Apr 22, 2021

If there is a two-high wall and the player starts breaking the top block while jumping and running into the wall, then the player will be able to break the block.

Glitch.mp4
@eVisper eVisper changed the title Players without permission able to break blocks. Glitch for players without permission to break blocks. Apr 22, 2021
@eVisper eVisper closed this as completed Apr 23, 2021
@eVisper eVisper reopened this Apr 23, 2021
@CDFN
Copy link

CDFN commented Jul 4, 2021

I picked up some debugging, here are results:

When bug occurs, that's how dump of event looks:
Break{cancelled=false, cause=Cause[Context=Context[], Stack={EntityPlayerMP['CDFN'/100, l='world', x=227.55, y=63.00, z=-120.54]}], context=Context[], source=EntityPlayerMP['CDFN'/100, l='world', x=227.55, y=63.00, z=-120.54], transactions=[Transaction{original=SpongeBlockSnapshot{worldUniqueId=50ead76e-06ea-4d2c-a87f-05bb1b3c4141, position=(227, 62, -121), blockState=minecraft:dirt[snowy=false,variant=dirt], extendedState=minecraft:dirt[snowy=false,variant=dirt]}, default=SpongeBlockSnapshot{worldUniqueId=50ead76e-06ea-4d2c-a87f-05bb1b3c4141, position=(227, 62, -121), blockState=minecraft:air, extendedState=minecraft:air}, custom=null, valid=true}]}
When event is being blocked, that's how dump of event looks:
Break{cancelled=false, cause=Cause[Context=Context["sponge:spawn_type"=SpongeSpawnType{id=sponge:dropped_item, name=DroppedItem}, "sponge:owner"=EntityPlayerMP['CDFN'/104, l='world', x=227.41, y=62.00, z=-120.70], "sponge:used_hand"=MAIN_HAND, "sponge:block_hit"=SpongeBlockSnapshot{worldUniqueId=50ead76e-06ea-4d2c-a87f-05bb1b3c4141, position=(228, 62, -121), blockState=minecraft:dirt[snowy=false,variant=dirt], extendedState=minecraft:dirt[snowy=false,variant=dirt]}, "sponge:notifier"=EntityPlayerMP['CDFN'/104, l='world', x=227.41, y=62.00, z=-120.70], "sponge:used_item"=SpongeItemStackSnapshot{itemType=minecraft:dirt, quantity=18}], Stack={EntityPlayerMP['CDFN'/104, l='world', x=227.41, y=62.00, z=-120.70], com.google.common.util.concurrent.ListenableFutureTask@3161b038}], context=Context["sponge:spawn_type"=SpongeSpawnType{id=sponge:dropped_item, name=DroppedItem}, "sponge:owner"=EntityPlayerMP['CDFN'/104, l='world', x=227.41, y=62.00, z=-120.70], "sponge:used_hand"=MAIN_HAND, "sponge:block_hit"=SpongeBlockSnapshot{worldUniqueId=50ead76e-06ea-4d2c-a87f-05bb1b3c4141, position=(228, 62, -121), blockState=minecraft:dirt[snowy=false,variant=dirt], extendedState=minecraft:dirt[snowy=false,variant=dirt]}, "sponge:notifier"=EntityPlayerMP['CDFN'/104, l='world', x=227.41, y=62.00, z=-120.70], "sponge:used_item"=SpongeItemStackSnapshot{itemType=minecraft:dirt, quantity=18}], source=EntityPlayerMP['CDFN'/104, l='world', x=227.41, y=62.00, z=-120.70], transactions=[Transaction{original=SpongeBlockSnapshot{worldUniqueId=50ead76e-06ea-4d2c-a87f-05bb1b3c4141, position=(228, 62, -121), blockState=minecraft:dirt[snowy=false,variant=dirt], extendedState=minecraft:dirt[snowy=false,variant=dirt]}, default=SpongeBlockSnapshot{worldUniqueId=50ead76e-06ea-4d2c-a87f-05bb1b3c4141, position=(228, 62, -121), blockState=minecraft:air, extendedState=minecraft:air}, custom=null, valid=true}]}

if condition in following line doesn't let code go through, because we're missing sponge:spawn_type tag.

event.getContext().containsKey(EventContextKeys.SPAWN_TYPE) &&

I'm wondering if it's something we can fix or it's problem on Sponge's end.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants