MTVehicles / MinetopiaVehicles

A realistic vehicle plugin for your Minecraft server!
https://mtvehicles.nl
MIT License
92 stars 29 forks source link

Trunk dupe fix #164

Closed Djorr closed 1 year ago

Djorr commented 1 year ago

Issue description There is a duplication bug on all minecraft versions. When using an auto clicker to open a trunk, remove an item, and then open the trunk again, all items remains in the trunk

How to reproduce The bug occurs when a player uses an auto clicker to open a trunk and remove an item. Upon opening the trunk again, the previously removed item is still present in the trunk. This issue could potentially lead to duplication exploits and disrupt gameplay.

Dupe Showcase Here is a video demonstrating the issue: Video Link

Solution I have discovered that when opening the trunk with an auto clicker, it triggers the code multiple times. I have implemented a check to prevent the code from being executed again if the player is already inside the trunk. This fix resolves the duplication issue.