Package org.spout.vanilla.inventory.window

Examples of org.spout.vanilla.inventory.window.Window.onClick()


    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());
      window.onOutsideClick();
    } else {
View Full Code Here


    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.