@Override
public void change(Event e, Object[] delta, Changer.ChangeMode mode) {
Block b = getExpr().getSingle(e);
if (b == null) {
return;
}
if (b.getState() instanceof BeaconInventory) {
((BeaconInventory) b.getState()).setItem((ItemStack) delta[0]);
}
}
java类org.bukkit.inventory.BeaconInventory的实例源码
SExprBeaconFuel.java 文件源码
项目:QuarSK
阅读 18
收藏 0
点赞 0
评论 0
SExprBeaconFuel.java 文件源码
项目:QuarSK
阅读 18
收藏 0
点赞 0
评论 0
@Nullable
@Override
public ItemStack convert(@NotNull Block block) {
BlockState state = block.getState();
return state instanceof BeaconInventory ? ((BeaconInventory) state).getItem() : null;
}