cn.nukkit.item.randomitem.ConstantItemSelector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of powernukkit Show documentation
Show all versions of powernukkit Show documentation
A Minecraft Bedrock Edition server software implementation made in Java from scratch which supports all new features.
package cn.nukkit.item.randomitem;
import cn.nukkit.item.Item;
/**
* @author Snake1999
* @since 2016/1/15
*/
public class ConstantItemSelector extends Selector {
protected final Item item;
public ConstantItemSelector(int id, Selector parent) {
this(id, 0, parent);
}
public ConstantItemSelector(int id, Integer meta, Selector parent) {
this(id, meta, 1, parent);
}
public ConstantItemSelector(int id, Integer meta, int count, Selector parent) {
this(Item.get(id, meta, count), parent);
}
public ConstantItemSelector(Item item, Selector parent) {
super(parent);
this.item = item;
}
public Item getItem() {
return item;
}
public Object select() {
return getItem();
}
}