Examples of KeyBindingPress


Examples of org.spoutcraft.api.keyboard.KeyBindingPress

  public void summon(KeyBinding binding, int key, boolean keyReleased, int screen) {
    if (binding.getDelegate() == null &&  binding.getUniqueId() != null) { // Server-side
      SpoutClient.getInstance().getPacketManager().sendSpoutPacket(new PacketKeyBinding(binding, key, !keyReleased, screen));
    } else if (binding.getDelegate() != null) { // Client-side
      KeyBindingPress event = new KeyBindingPress(org.spoutcraft.api.gui.Keyboard.getKey(key), binding, ScreenType.getType(screen));
      if (!keyReleased) {
        binding.getDelegate().onKeyPress(event);
      } else {
        binding.getDelegate().onKeyRelease(event);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.