Search in sources :

Example 1 with CustomItem

use of xyz.derkades.ublisk.utils.inventory.CustomItem in project Ublisk by Derkades.

the class MoneyItem method fromItem.

public static MoneyItem fromItem(Item item) {
    CustomItem customItem = CustomItem.fromItem(item);
    Type type = Type.valueOf(customItem.getIdentifier());
    return new MoneyItem(type);
}
Also used : CustomItem(xyz.derkades.ublisk.utils.inventory.CustomItem)

Example 2 with CustomItem

use of xyz.derkades.ublisk.utils.inventory.CustomItem in project Ublisk by Derkades.

the class CustomItemCommand method onCommand.

@Override
protected void onCommand(UPlayer player, String[] args) {
    UInventory inv = player.getInventory();
    inv.addItem(new CustomItem("test"));
    inv.addItem(new CustomItem("happy"));
    inv.addItem(new CustomItem("sad"));
}
Also used : CustomItem(xyz.derkades.ublisk.utils.inventory.CustomItem) UInventory(xyz.derkades.ublisk.utils.inventory.UInventory)

Aggregations

CustomItem (xyz.derkades.ublisk.utils.inventory.CustomItem)2 UInventory (xyz.derkades.ublisk.utils.inventory.UInventory)1