yescallop / Nukkit

Nuclear Powered Server For Minecraft: Pocket Edition
http://nukkit.cn
GNU General Public License v3.0
32 stars 5 forks source link

ModalForms API #54

Closed kvetinac97 closed 7 years ago

kvetinac97 commented 7 years ago

Create them with player.showFormWindow, and then listen to the result with PlayerFormRespondedEvent !!!

yescallop commented 7 years ago

Have you tested all kinds of form elements and they worked? I'll merge if everything is tested ok

kvetinac97 commented 7 years ago

Everything worked except: Slider did only show, but I was not able to move with it. Probably client or plugin issue (I think I have set wrong min/max/step values)

kvetinac97 commented 7 years ago

Preview: shown

yescallop commented 7 years ago

And response handlers can make developing less complex. e.g. : player.showFormWindow(window, resp -> player.sendMessage(((FormResponseCustom) resp).getInputResponse(0))); If you could add apis like this, it will be better

yescallop commented 7 years ago

too quick to merge? you could open another pull request to fix the bugs found