本文整理汇总了Java中pl.betoncraft.betonquest.api.QuestEvent类的典型用法代码示例。如果您正苦于以下问题:Java QuestEvent类的具体用法?Java QuestEvent怎么用?Java QuestEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
QuestEvent类属于pl.betoncraft.betonquest.api包,在下文中一共展示了QuestEvent类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import pl.betoncraft.betonquest.api.QuestEvent; //导入依赖的package包/类
@Override
public void run(String playerID) throws QuestRuntimeException {
for (QuestEvent event : internalEvents) {
event.run(playerID);
}
}
示例2: registerEvents
import pl.betoncraft.betonquest.api.QuestEvent; //导入依赖的package包/类
/**
* Registers new event classes by their names
*
* @param name
* name of the event type
* @param eventClass
* class object for the condition
*/
public void registerEvents(String name, Class<? extends QuestEvent> eventClass) {
Debug.info("Registering " + name + " event type");
eventTypes.put(name, eventClass);
}
示例3: getEventClass
import pl.betoncraft.betonquest.api.QuestEvent; //导入依赖的package包/类
/**
* @param name the name of the event class, as previously registered
* @return the class of the event
*/
public Class<? extends QuestEvent> getEventClass(String name) {
return eventTypes.get(name);
}