Examples of ClickArguments


Examples of org.spout.vanilla.inventory.window.ClickArguments

    Window window = holder.get(WindowHolder.class).getActiveWindow();
    if (message.get() == null) {
      //Taking item from existing slot
      window.setCursorItem(null);
      ClickArguments args = window.getClickArguments(message.getSlot(), ClickArguments.ClickAction.LEFT_CLICK);
      if (args != null) {
        window.onClick(args);
      }
    } else if (message.getSlot() == -1) {
      window.setCursorItem(message.get());
View Full Code Here

Examples of org.spout.vanilla.inventory.window.ClickArguments

  public void handleServer(ServerSession session, WindowClickMessage message) {
    Player player = session.getPlayer();
    Window window = player.get(WindowHolder.class).getActiveWindow();
    boolean result = false;
    int slot = message.getSlot();
    ClickArguments args = window.getClickArguments(slot, ClickArguments.ClickAction.getAction(message.getMode(), message.getButton()));
    if (args != null) {
      result = window.onClick(args);
    }
    session.send(new WindowTransactionMessage(window, message.getTransaction(), result));
  }
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.