/**
* Sets this item's main effect, assuming it is a potion.
* <p />
* <b>UNSAFE</b>
*
* @param effectType effect type to set
*
* @return this item builder instance, for chaining
* @see ItemBuilder#potionMain(PotionData)
*/
@Deprecated
public ItemBuilder potionMain(PotionEffectType effectType) {
if (isPotionMeta()) {
try {
PotionMeta potionMeta = (PotionMeta) this.itemMeta;
if (potionMeta.setMainEffect(effectType) == false) {
potionMeta.setBasePotionData(new PotionData(potionTypeFromLegacy(effectType), false, false));
}
} catch (Exception e) {
if (!this.failSilently) {
e.printStackTrace();
}
}
}
return this;
}
ItemBuilder.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:SupaCommons
作者:
评论列表
文章目录