-
-
Notifications
You must be signed in to change notification settings - Fork 552
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
Comments
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. |
Hello, any updates on this issue? One of our players was able to drive boat into other players regions causing havoc to their stashes. |
Uhm, this is still a bug! 😄 |
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. |
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. |
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. |
This comment was marked as spam.
This comment was marked as spam.
Feel free to fix it and make a pull request. |
Anyone interested in this issue - this plugin has helped on our server https://github.com/AztecMC/WGItemFrameBreakFlags |
This comment was marked as off-topic.
This comment was marked as off-topic.
there is a flag, |
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. |
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? |
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
The text was updated successfully, but these errors were encountered: