Examples of onItemTake()


Examples of org.getspout.spoutapi.gui.Slot.onItemTake()

        stackOnCursor.setAmount(amountCursor);
        stackInSlot.setAmount(amountSlot);
        if (amountSlot == 0) {
          stackInSlot = new ItemStack(0);
        }
        SlotEvent s = new SlotTakeEvent(p, slot, stackInSlot, !slot.onItemTake(stackOnCursor));
        Bukkit.getPluginManager().callEvent(s);
        if (!s.isCancelled()) {
          slot.setItem(stackInSlot);
        } else {
          slot.setDirty(true); // We need to tell the client that the operation was denied.
View Full Code Here

Examples of org.getspout.spoutapi.gui.Slot.onItemTake()

        if (holdingShift) {
          slot.onItemShiftClicked();
          SlotEvent s = new SlotShiftClickEvent(p, slot);
          Bukkit.getPluginManager().callEvent(s);
        } else { // Take item
          SlotEvent s = new SlotTakeEvent(p, slot, stackInSlot, !slot.onItemTake(stackInSlot));
          Bukkit.getPluginManager().callEvent(s);
          if (!s.isCancelled()) {
            stackOnCursor = stackInSlot;
            slot.setItem(new ItemStack(0));
          } else {
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.