serversigns / ServerSigns

ServerSigns (SVS) provides the ability to bind player-dispatched and server-disptached commands, messages and actions to signs and every other block in Minecraft.
https://dev.bukkit.org/projects/serversigns
GNU Affero General Public License v3.0
13 stars 13 forks source link

Clicking certain blocks executes serversign commands twice #12

Closed Segysmundo closed 4 years ago

Segysmundo commented 5 years ago

Some time ago there was a fix added for certain blocks that if they had a serversign attached to them and were clicked once, they would execute the commands twice. Normally this are interactive blocks such as Doors, Buttons, Chests etc.

But blocks like Barriers, End Portal Frames and maybe others I haven't found out about still have the same problem.

I believe the fix was done by adding somewhere in the code a list of blocks that would cause this and forcing them to execute commands only once. I haven't been able to find the specific file where this was done.

So I was hoping there is a way to finally fix this for every block instead of having to manually keep adding blocks to that list.

EpiCanard commented 4 years ago

The command execute twice only for Barriers and EndPortal or is there other blocks affected by this bug ?

Segysmundo commented 4 years ago

For now I found those 2, apart from the ones that were already fixed. If you give me 1 day or so I can try and find other affected blocks.

EpiCanard commented 4 years ago

You find one that should be already fixed put it is not the case ? Take all the time you want to male more test.

Oh and which version of ServerSigns and minecraft do you use ?

Segysmundo commented 4 years ago

What I meant is that doors, chests, buttons and some others had this problem and were already fixed , so apart of those I found Barrier and EndPortalFrame that also have the problem.

Edit: Read your reply again, yeah I believe barriers and end portal frames were never fixed when the other ones such as doors etc were fixed.

EpiCanard commented 4 years ago

I read quickly the code and I found nothing except for redstone plates but I will look further tomorrow.

Can you give me your Minecraft version and the version of Serversigns you use ?

Segysmundo commented 4 years ago

I'm on Paper 1.13.2 using latest serversigns version (4.5.3).

Upon further testing I realised almost all blocks execute commands twice, the only ones that exceute them once and work as intended are the ones that I already mentioned in the first comment.

Moreover, when you click on one of this buggy serversign blocks while holding a block/item that can be placed then commands are only executed once. So clicking them while holding a stick, sword, etc. still makes the serversigns execute twice.

EpiCanard commented 4 years ago

Thanks for the details, I will look forward for that

EpiCanard commented 4 years ago

After first tests it seems that every block that can use both hand are affected by this bug (for exemple: you can use both to set an ender eye inside an end portal frame)

Segysmundo commented 4 years ago

How does this apply to Stone or Glass for example? Left click breaks the block but I'm not sure what right click does to those blocks.

EpiCanard commented 4 years ago

I went a little to quick to conclusion, it still append with old version like 1.9.4 that don't have two hands

EpiCanard commented 4 years ago

Oh :O Dual Wielding has been added in 1.9. I didn't remember it was that old :O I confirm the bug is not present in 1.8. And I tested with glass and there is two event one for each hand

Segysmundo commented 4 years ago

Good to know, looking forward to seeing this double execution thing fixed once and for all!

EpiCanard commented 4 years ago

Fixed and released in v4.6.0