Package org.spoutcraft.api.keyboard

Examples of org.spoutcraft.api.keyboard.KeyBinding


    output.writeLong(uniqueId.getMostSignificantBits());
    output.writeLong(uniqueId.getLeastSignificantBits());
  }

  public void run(int playerId) {
    KeyBinding binding = new KeyBinding(key, plugin, id, description);
    binding.setUniqueId(uniqueId);
    SpoutClient.getInstance().getKeyBindingManager().registerControl(binding);
  }
View Full Code Here


  public SimpleKeyBindingManager() {
  }

  public void registerControl(KeyBinding binding) {
    KeyBinding result = null;
    for (KeyBinding check:bindings) {
      if (check.getId().equals(binding.getId()) && check.getAddonName().equals(binding.getAddonName())) {
        result = check;
      }
    }
    if (result != null) {
      result.takeChanges(binding);
    } else {
      bindings.add(binding);
    }
    updateBindings();
    save();
View Full Code Here

        } else if (item.containsKey("plugin")) {
          addonName = (String) item.get("plugin");
        } else {
          continue; // Invalid item
        }
        KeyBinding binding = new KeyBinding(key, addonName, id, description);
        binding.setRawModifiers(modifiers);
        bindings.add(binding);
      }
    } catch (Exception e) {
      e.printStackTrace();
      bindings = new ArrayList<KeyBinding>();
View Full Code Here

TOP

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

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.