Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Itemframes can be destroyed by boats in regions #1434

Open
LadyCailinBot opened this issue May 14, 2018 · 14 comments
Open

Itemframes can be destroyed by boats in regions #1434

LadyCailinBot opened this issue May 14, 2018 · 14 comments
Labels
status:upstream This issue should be handled upstream from WorldGuard. type:bug Incorrect behavior, not working as intended

Comments

@LadyCailinBot
Copy link

WORLDGUARD-3934 - Reported by Bedah

Hey,
placing a boat and driving against an itemframe in a region, leaves a frame after some time fall off.
Some options to block that without prohibiting boats?

WG: 6.2.2
Spigot: 1.12.2

Best Regards

@LadyCailinBot
Copy link
Author

Comment by PseudoKnight

What unusual behavior. Looks like it's a PHYSICS cause. There's no perfect way of preventing exploitation of this since there's no associated player if they're not in the boat. There are some reasonable partial solutions, though, as well as some blanket blocking options. These would need to be added.

@farum12
Copy link

farum12 commented Mar 25, 2021

Hello, any updates on this issue? One of our players was able to drive boat into other players regions causing havoc to their stashes.

@wizjany wizjany added status:upstream This issue should be handled upstream from WorldGuard. type:bug Incorrect behavior, not working as intended and removed z!Bug (do not assign) labels Jun 8, 2021
@iperrealistico
Copy link

Uhm, this is still a bug! 😄
Players can simply ride a boat into a frame and make it drop. Easy as that.

https://cdn.discordapp.com/attachments/470410381597343753/851615802293747722/Minecraft_1.16.5_-_Multiplayer_3rd-party_Server_2021-06-08_02-15-32_Trim.mp4

@Phoenix616
Copy link
Contributor

Phoenix616 commented Feb 3, 2022

Kinda sad this exploit is still in the plugin almost 4 years later :S (and that I only now hear about it...)

Would probably be good to either push for an entity collide event finally getting added, make this particular type of destruction call the EntityBreakHangingEvent or (as a workaround) stop breaking of item frames from the physics when a boat is nearby.

@wizjany
Copy link
Collaborator

wizjany commented Feb 3, 2022

as far as I can tell, a wide variety of entities can trigger this. there is no way for us to do anything about this short of cancelling all physics-caused hangingbreak events, which is tbh stupid. feel free to PR to spigot a more correct behavior like HangingBreakByEntityEvent.

@Phoenix616
Copy link
Contributor

I feel like it would be better to have a couple of false positive entity destruction blocked inside a protected region in general for the sake of not having possible griefing exploits. Of course the plugin API needs improvement there.

@TomLewis

This comment was marked as spam.

@Joo200
Copy link
Collaborator

Joo200 commented May 21, 2022

Feel free to fix it and make a pull request.

@farum12
Copy link

farum12 commented May 22, 2022

Anyone interested in this issue - this plugin has helped on our server https://github.com/AztecMC/WGItemFrameBreakFlags

@TomLewis

This comment was marked as off-topic.

@EngineHub EngineHub deleted a comment from TomLewis May 23, 2022
@longemen3000
Copy link

there is a flag, entity-item-frame-destroy, that seems to stop this, but does not work on minecraft 1.17 and worldguard 7.0.6. it does seem to work on 7.0.7 and 1.18

@wizjany
Copy link
Collaborator

wizjany commented Oct 15, 2022

that would imply something has changed upstream, since (as noted 4 years ago at the top of this comment chain) there hasn't been any entity associated with this sort of breaking previously. however the spigot bug (https://hub.spigotmc.org/jira/browse/SPIGOT-3999) is still open so i'm unsure that's really the case.

@radiant-ai
Copy link

I fix this with something like this and it works for me for a year already:

@EventHandler
    public void onItemFrameDestroy(HangingBreakEvent event) {
        if (!(event.getEntity() instanceof ItemFrame itemFrame)) {
            return;
        }
        if (event.getCause() != HangingBreakEvent.RemoveCause.PHYSICS) {
            return;
        }
        var block = itemFrame.getLocation().getBlock().getRelative(itemFrame.getAttachedFace());
        if (!block.getType().isSolid()) {
            return;
        }
        event.setCancelled(true);
    }

Can this be probably added behind a config option so people can protect their servers?

@RedstoneFuture
Copy link

PaperMC/Paper#10058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:upstream This issue should be handled upstream from WorldGuard. type:bug Incorrect behavior, not working as intended
Projects
None yet
Development

No branches or pull requests

10 participants