connection-lost / LockettePro

LockettePro - A much better Lockette plugin for Bukkit [1.8 - 1.12]
42 stars 59 forks source link

[CRITICAL BUG] Losing blocks #32

Closed ygtdmn closed 7 years ago

ygtdmn commented 7 years ago

Version Information: LockettePro: 2.6.4 Spigot: 1.8

Bug Information: A player sent me a bug report about losing spawners. When you try to put a spawner on locked spawner your spawner is losing and block not being placed. Than i make a video to reproduce. Also is it a bug not to put another block on the blocks?

Video: https://youtu.be/ov5swAc6wVs

connection-lost commented 7 years ago

Which custom spawner plugin are you using?

ygtdmn commented 7 years ago

I have a custom private plugin. I can share source code in private with you if you want.

connection-lost commented 7 years ago

Please send me privately at frankwu1995(at)hotmail.com

I solved a similar issue a year ago. It is possible that your custom plugin has a little incompatibility and requires a one line rewrite.

ygtdmn commented 7 years ago

I sent.

connection-lost commented 7 years ago

I have 2 recommended solution for you:

  1. (Good solution) At Main.java, line 287: Please change this line @EventHandler to @EventHandler(priority=EventPriority.HIGHEST)

  2. (Fair solution) At Main.java, line 288, for the entire method "BlokKoyunca(BlockPlaceEvent event)": Please use "event.setCancelled()" if the spawner is correctly placed.

The issue is caused by your custom spawner plugin did not attempted to accommodate with another plugin. The solution above will add proper accommodation procedures.

ygtdmn commented 7 years ago

I did but problem still continues.

ygtdmn commented 7 years ago

Oh block disappearing problem is solved but still cant put a block on a spawner.

connection-lost commented 7 years ago

"Oh block disappearing problem is solved but still cant put a block on a spawner." This should only happen if the you do not have permission to the other spawner... Please try confirm, I will look into it again if it is not the case.

ygtdmn commented 7 years ago

Yes, no permission to the other block. But why players cant put a spawner on a another persons spawner?

connection-lost commented 7 years ago

I'll go check again

connection-lost commented 7 years ago

"Yes, no permission to the other block. But why players cant put a spawner on a another persons spawner?"

Wait nonono, sorry for my previous reply, but this is intended! You are not supposed to "interact" with unauthorized block in any time! This is because locking a stone is not necessary to prevent interaction, but preventing interaction will avoid conflict with other plugins. In this case, preventing interaction with a stone will sufficiently block "super breaker pickaxe" from mcmmo. It is not possible to perfectly protect a block while safely coordinate with all other plugins.

Putting a block on another block is actually "right click" interaction with "target block" while you have "some block in hand".

Solution is simple: try to put the block from another direction.