Package org.spoutcraft.api.keyboard

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

Related Classes of org.spoutcraft.api.keyboard.KeyBindingPress

Copyright © 2018 www.massapicom. 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.