ItemBuilder.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:SupaCommons 作者:
/**
 * 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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号