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


Java EventManager.createChildNode方法代码示例

本文整理汇总了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");
}
 
开发者ID:Alf21,项目名称:event-system,代码行数:17,代码来源:EventSystem.java

示例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");
}
 
开发者ID:Alf21,项目名称:textdraw-system,代码行数:13,代码来源:TextdrawSystem.java

示例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();
}
 
开发者ID:GTAUN,项目名称:wl-vehicle-manager,代码行数:41,代码来源:VehicleManagerServiceImpl.java

示例4: PlayerData

import net.gtaun.util.event.EventManager; //导入方法依赖的package包/类
public PlayerData(EventManager eventManager, Player player) {
    super(eventManager, player);
    this.eventManagerNode = eventManager.createChildNode();
}
 
开发者ID:Shoebill,项目名称:shoebill-streamer,代码行数:5,代码来源:PlayerData.java


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