/**
* Removes a {@link FireworkEffect} by index from this item, assuming it is a firework. If it is
* a
* firework charge, its one and only effect is removed, disregarding the index given.
* <p />
* <b>UNSAFE</b>
*
* @param index index of the firework to remove
*
* @return this item builder instance, for chaining
*/
public ItemBuilder fireworkRemove(int index) {
boolean b = isFireworkEffectMeta();
if (b || isFireworkMeta()) {
try {
if (b) {
((FireworkEffectMeta) this.itemMeta).setEffect(null);
} else {
((FireworkMeta) this.itemMeta).removeEffect(index);
}
} catch (Exception e) {
if (!this.failSilently) {
e.printStackTrace();
}
}
}
return this;
}
ItemBuilder.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:SupaCommons
作者:
评论列表
文章目录