DevSrSouza / KotlinBukkitAPI

KotlinBukkitAPI is an API for Bukkit/SpigotAPI using the cool and nifty features Kotlin has to make your life more easier.
MIT License
156 stars 20 forks source link

Menu update #24

Open Hai-tun opened 3 years ago

Hai-tun commented 3 years ago

Upgrade menu module

DevSrSouza commented 3 years ago

Hey @Hai-tun, this for the PR, but, you can explain the changes that this PR does?

Hai-tun commented 3 years ago

menu : Separate cancelOnClick into cancelOnTopClick(defalut = true) and cancelOnBottomClick(defalut = false) (The bottom inventory will be clickable and moveable)


top drag : Changed from canceling the event to returning the illegally dragged item back to the cursor


bottom inventory double click : Add anti illegal bottom inventory shift click


bottom inventory shift click : Add anti illegal bottom inventory shift click


Hai-tun commented 3 years ago

@DevSrSouza Add an executor priority fix

Hai-tun commented 3 years ago

@DevSrSouza Plz, review code and merge.

DevNatan commented 3 years ago

i think it would be better if you kept the cancelOnClick parameter of the menu func, for reasons of backward compatibility.

Hai-tun commented 3 years ago

It seems to be able to improve compatibility by that way... but in fact, the signature of the method has changed due to the addition of parameters. So even if cancelOnClick is not modified, the bytecode still unable to be compatible.