/**
* Adds {@link Pattern}s to this banner, assuming it is a banner.
* <p />
* <b>UNSAFE</b>
*
* @param patterns patterns to add
*
* @return this item builder instance, for chaining
*/
public ItemBuilder bannerAdd(Pattern... patterns) {
if (patterns == null) {
if (!this.failSilently) {
throw new IllegalArgumentException("patterns cannot be null.");
}
return this;
}
if (isBannerMeta()) {
try {
for (Pattern pattern : patterns) {
if (pattern != null) {
((BannerMeta) this.itemMeta).addPattern(pattern);
} else {
throw new NullPointerException("pattern element is null.");
}
}
} catch (Exception e) {
if (!this.failSilently) {
e.printStackTrace();
}
}
}
return this;
}
ItemBuilder.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:SupaCommons
作者:
评论列表
文章目录