本文整理汇总了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());
}
示例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() + "\"");
}
示例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);
}
}
示例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);
}
}