@Nullable
@Override
protected Timespan[] get(Event e) {
ItemStack i = item.getSingle(e);
if (i == null) {
return null;
}
if (PotionUtils.isPotionItem(i)) {
PotionMeta meta = (PotionMeta) i.getItemMeta();
PotionEffect eff = PotionUtils.getEffectByEffectType(meta, effectType.getSingle(e));
if (eff == null) {
return null;
}
return new Timespan[]{Timespan.fromTicks_i(eff.getDuration())};
}
return null;
}
SExprItemEffectTypeDuration.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:QuarSK
作者:
评论列表
文章目录