CraftManager.java 文件源码

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

项目:RPGInventory 作者:
public static boolean init(RPGInventory instance) {
    MemorySection config = (MemorySection) Config.getConfig().get("craft");
    if (!config.getBoolean("enabled") || !config.contains("extensions")) {
        return false;
    }

    try {
        capItem = ItemUtils.getTexturedItem(config.getString("extendable"));

        Set<String> extensionNames = config.getConfigurationSection("extensions").getKeys(false);
        for (String extensionName : extensionNames) {
            EXTENSIONS.add(new CraftExtension(extensionName, config.getConfigurationSection("extensions." + extensionName)));
        }
    } catch (Exception e) {
        e.printStackTrace();
        return false;
    }

    // Register listeners
    ProtocolLibrary.getProtocolManager().addPacketListener(new CraftListener(instance));
    return true;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号