summaryrefslogtreecommitdiff
path: root/src/main/java/jp/plusplus/fbs/mod/TFKProductItem.java
blob: 41cd8ddf7c250d7b08a67d3be953dbe3e7888aa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package jp.plusplus.fbs.mod;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import shift.mceconomy2.api.shop.IProduct;
import shift.mceconomy2.api.shop.IShop;

/**
 * Created by plusplus_F on 2015/11/02.
 */
public class TFKProductItem implements IProduct {
    protected ItemStack product;
    protected int cost;

    public TFKProductItem(ItemStack p, int c){
        product=p;
        cost=c;
    }

    @Override
    public ItemStack getItem(IShop shop, World world, EntityPlayer player) {
        return product;
    }

    @Override
    public int getCost(IShop shop, World world, EntityPlayer player) {
        return cost;
    }

    @Override
    public boolean canBuy(IShop shop, World world, EntityPlayer player) {
        return true;
    }
}