@Override
public boolean isSTBItem(ItemStack stack, Class<? extends BaseSTBItem> c) {
if (stack == null || !stack.hasItemMeta()) {
return false;
}
ItemMeta im = stack.getItemMeta();
if (im.hasLore()) {
List<String> lore = im.getLore();
if (!lore.isEmpty() && lore.get(0).startsWith(LORE_PREFIX)) {
if (c != null) {
Configuration conf = getItemAttributes(stack);
ReflectionDetails details = reflectionDetailsMap.get(conf.getString("*TYPE"));
return details != null && c.isAssignableFrom(details.clazz);
} else {
return true;
}
}
}
return false;
}
STBItemRegistry.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:sensibletoolbox
作者:
评论列表
文章目录