当前位置: 首页>>代码示例>>Java>>正文


Java SlimefunItem.bindToResearch方法代码示例

本文整理汇总了Java中me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem.bindToResearch方法的典型用法代码示例。如果您正苦于以下问题:Java SlimefunItem.bindToResearch方法的具体用法?Java SlimefunItem.bindToResearch怎么用?Java SlimefunItem.bindToResearch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem的用法示例。


在下文中一共展示了SlimefunItem.bindToResearch方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: register

import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; //导入方法依赖的package包/类
public void register()
{
    SlimefunStartup.getResearchCfg().setDefaultValue("enable-researching", Boolean.valueOf(true));
    if(SlimefunStartup.getResearchCfg().contains((new StringBuilder(String.valueOf(getID()))).append(".enabled").toString()) && !SlimefunStartup.getResearchCfg().getBoolean((new StringBuilder(String.valueOf(getID()))).append(".enabled").toString()))
    {
        for(Iterator iterator = items.iterator(); iterator.hasNext(); iterator.remove())
        {
            SlimefunItem item = (SlimefunItem)iterator.next();
            if(item != null)
                item.bindToResearch(null);
        }

        return;
    }
    SlimefunStartup.getResearchCfg().setDefaultValue((new StringBuilder(String.valueOf(getID()))).append(".name").toString(), getName());
    SlimefunStartup.getResearchCfg().setDefaultValue((new StringBuilder(String.valueOf(getID()))).append(".cost").toString(), Integer.valueOf(getCost()));
    SlimefunStartup.getResearchCfg().setDefaultValue((new StringBuilder(String.valueOf(getID()))).append(".enabled").toString(), Boolean.valueOf(true));
    name = SlimefunStartup.getResearchCfg().getString((new StringBuilder(String.valueOf(getID()))).append(".name").toString());
    cost = SlimefunStartup.getResearchCfg().getInt((new StringBuilder(String.valueOf(getID()))).append(".cost").toString());
    list.add(this);
    if(SlimefunStartup.getCfg().getBoolean("options.print-out-loading"))
        System.out.println((new StringBuilder("[Slimefun] Loaded Research \"")).append(getName()).append("\"").toString());
}
 
开发者ID:StarWishsama,项目名称:Slimefun4-Chinese-Version,代码行数:24,代码来源:Research.java

示例2: register

import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; //导入方法依赖的package包/类
/**
 * Registers the research.
 * 
 * @since 4.0
 */
public void register() {
	SlimefunStartup.getResearchCfg().setDefaultValue("enable-researching", true);

	if (SlimefunStartup.getResearchCfg().contains(this.getID() + ".enabled") && !SlimefunStartup.getResearchCfg().getBoolean(this.getID() + ".enabled")) {
		Iterator<SlimefunItem> iterator = items.iterator();
		while (iterator.hasNext()) {
			SlimefunItem item = iterator.next();
			if (item != null) item.bindToResearch(null);
			iterator.remove();
		}
		return;
	}

	SlimefunStartup.getResearchCfg().setDefaultValue(this.getID() + ".name", this.getName());
	SlimefunStartup.getResearchCfg().setDefaultValue(this.getID() + ".cost", this.getCost());
	SlimefunStartup.getResearchCfg().setDefaultValue(this.getID() + ".enabled", true);

	this.name = SlimefunStartup.getResearchCfg().getString(this.getID() + ".name");
	this.cost = SlimefunStartup.getResearchCfg().getInt(this.getID() + ".cost");

	list.add(this);
	if (SlimefunStartup.getCfg().getBoolean("options.print-out-loading")) System.out.println("[Slimefun] Loaded Research \"" + this.getName() + "\"");
}
 
开发者ID:TheBusyBiscuit,项目名称:Slimefun4,代码行数:29,代码来源:Research.java

示例3: addItems

import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; //导入方法依赖的package包/类
public transient void addItems(SlimefunItem items[])
{
    SlimefunItem aslimefunitem[];
    int j = (aslimefunitem = items).length;
    for(int i = 0; i < j; i++)
    {
        SlimefunItem item = aslimefunitem[i];
        if(item != null)
            item.bindToResearch(this);
    }

}
 
开发者ID:StarWishsama,项目名称:Slimefun4-Chinese-Version,代码行数:13,代码来源:Research.java

示例4: addItems

import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; //导入方法依赖的package包/类
/**
 * Bind the specified Slimefun items to the research.
 * 
 * @param items {@link SlimefunItem} to bind to the research
 * 
 * @since 4.0
 */
public void addItems(SlimefunItem... items) {
	for (SlimefunItem item: items) {
		if (item != null) item.bindToResearch(this);
	}
}
 
开发者ID:TheBusyBiscuit,项目名称:Slimefun4,代码行数:13,代码来源:Research.java


注:本文中的me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem.bindToResearch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。