03.04.2016, 20:28
(
Последний раз редактировалось mk124; 04.04.2016 в 12:38.
)
@Su37Erich: I will take a look at it tomorrow, but it shouldn't be caused by the EventManager I think.
//Edit:
This code is working perfectly fine with the newest plugin, api and runtime:
You can try to create a new EventManagerNode, but I don't think this is related to this issue.
//Edit:
This code is working perfectly fine with the newest plugin, api and runtime:
PHP код:
getEventManager().registerHandler(PlayerKeyStateChangeEvent.class, e -> {
Player player = e.getPlayer();
if(player.getKeyState().isKeyPressed(PlayerKey.SPRINT)) {
player.sendMessage(Color.GREEN, "* You pressed SPRINT!");
} else {
player.sendMessage(Color.RED, "* You didn't press SPRINT!");
}
});