本文整理汇总了Java中net.gtaun.util.event.EventManager.createChildNode方法的典型用法代码示例。如果您正苦于以下问题:Java EventManager.createChildNode方法的具体用法?Java EventManager.createChildNode怎么用?Java EventManager.createChildNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.gtaun.util.event.EventManager
的用法示例。
在下文中一共展示了EventManager.createChildNode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onEnable
import net.gtaun.util.event.EventManager; //导入方法依赖的package包/类
@Override
protected void onEnable() throws Throwable {
instance = this;
EventManager eventManager = getEventManager();
eventManagerNode = eventManager.createChildNode();
playerLifecycleHolder = new PlayerLifecycleHolder(eventManager);
playerLifecycleHolder.registerClass(PlayerData.class);
playerManager = new PlayerManager();
languageService = Service.get(LanguageService.class);
localizedStringSet = languageService.createStringSet(new File(getDataDir(), "lang"));
//TODO: init EventMapBase
//TODO: init EventBase
EventNPCBase.initialize();
chat = new Chat();
System.out.println("[EVENT] initialized");
}
示例2: onEnable
import net.gtaun.util.event.EventManager; //导入方法依赖的package包/类
@Override
protected void onEnable() throws Throwable {
instance = this;
EventManager eventManager = getEventManager();
eventManagerNode = eventManager.createChildNode();
playerLifecycleHolder = new PlayerLifecycleHolder(eventManager);
playerLifecycleHolder.registerClass(PlayerData.class);
playerManager = new PlayerManager();
playersTextdraws = new ArrayList<>();
playerTextdraws = new ArrayList<>();
System.out.println("[TEXTDRAWSYSTEM] initialized");
}
示例3: VehicleManagerServiceImpl
import net.gtaun.util.event.EventManager; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public VehicleManagerServiceImpl(EventManager rootEventManager, VehicleManagerPlugin plugin, Datastore datastore)
{
super(rootEventManager);
this.plugin = plugin;
this.datastore = datastore;
eventManager = rootEventManager.createChildNode();
playerLifecycleHolder = new PlayerLifecycleHolder(eventManager);
LanguageService languageService = Service.get(LanguageService.class);
localizedStringSet = languageService.createStringSet(new File(plugin.getDataDir(), "text"));
statisticManager = new VehicleStatisticManager(eventManager, playerLifecycleHolder, this.datastore);
playerOwnedVehicles = new HashMap<>();
ownedVehicles = new HashSet<>();
playerOwnedVehicleLastPassengers = new WeakHashMap<>();
commonVehicles = new HashMap<>();
File commonVehiclesFile = new File(plugin.getDataDir(), "commonVehicles.yml");
try
{
Map<String, Object> map = (Map<String, Object>) new Yaml().load(new FileInputStream(commonVehiclesFile));
List<Map<String, Object>> vehicleGroups = (List<Map<String,Object>>) map.get("commonVehicles");
for (Map<String, Object> group : vehicleGroups)
{
String name = group.get("name").toString();
List<Integer> modelIds = (List<Integer>) group.get("modelIds");
commonVehicles.put(name, modelIds);
}
}
catch (Throwable e)
{
VehicleManagerPlugin.LOGGER.info(commonVehiclesFile + " failed to load!");
}
init();
}
示例4: PlayerData
import net.gtaun.util.event.EventManager; //导入方法依赖的package包/类
public PlayerData(EventManager eventManager, Player player) {
super(eventManager, player);
this.eventManagerNode = eventManager.createChildNode();
}