Paste #47227: Untitled Paste

Date: 2018/04/17 15:57:32 UTC-07:00
Type: Server Log

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16



        // <--[tag]
        // @attribute <i@item.with_qty[]>
        // @returns dItem
        // @mechanism dItem.quantity
        // @group properties
        // @description
        // Returns the item with the specified quantity.
        // -->
        if (attribute.startsWith("with_qty") && attribute.hasContext(1)) {
            ItemStack i = new ItemStack(item.getItemStack());
            i.setAmount(attribute.getIntContext(1));
            return new dItem(i)
                    .getAttribute(attribute.fulfill(1));
        }