• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java PermissionHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.dmulloy2.handlers.PermissionHandler的典型用法代码示例。如果您正苦于以下问题:Java PermissionHandler类的具体用法?Java PermissionHandler怎么用?Java PermissionHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PermissionHandler类属于net.dmulloy2.handlers包,在下文中一共展示了PermissionHandler类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onEnable

import net.dmulloy2.handlers.PermissionHandler; //导入依赖的package包/类
@Override
public void onEnable()
{
	long start = System.currentTimeMillis();

	/** Configuration **/
	saveDefaultConfig();
	reloadConfig();

	/** Register Handlers **/
	logHandler = new LogHandler(this);
	permissionHandler = new PermissionHandler(this);
	autoSaveHandler = new AutoSaveHandler(this);
	commandHandler = new CommandHandler(this);

	/** Register Commands **/
	commandHandler.setCommandPrefix("asp");
	commandHandler.registerPrefixedCommand(new CmdHelp(this));
	commandHandler.registerPrefixedCommand(new CmdReload(this));
	commandHandler.registerPrefixedCommand(new CmdSave(this));
	commandHandler.registerPrefixedCommand(new CmdVersion(this));

	/** Schedule Auto-Save task **/
	int delay = getConfig().getInt("delay", 15) * 20 * 60;
	new AutoSaveTask().runTaskTimer(this, delay, delay);

	logHandler.log("{0} has been enabled ({1}ms)", getDescription().getFullName(), System.currentTimeMillis() - start);
}
 
开发者ID:dmulloy2,项目名称:AutoSavePlus,代码行数:29,代码来源:AutoSavePlus.java


示例2: onEnable

import net.dmulloy2.handlers.PermissionHandler; //导入依赖的package包/类
@Override
public void onEnable()
{
	long start = System.currentTimeMillis();

	// Configuration
	saveDefaultConfig();
	reloadConfig();

	// Initialize variables
	loadedGuns = new HashMap<>();
	bullets = new ConcurrentHashMap<>();
	players = new ConcurrentHashMap<>();
	effects = new ConcurrentHashMap<>();

	disabledWorlds = getConfig().getStringList("disabledWorlds");

	// Handlers
	logHandler = new LogHandler(this);
	commandHandler = new CommandHandler(this);
	permissionHandler = new PermissionHandler(this);

	// Integration
	setupIntegration();

	// Register commands
	commandHandler.setCommandPrefix("swornguns");

	CmdHelp cmdHelp = new CmdHelp(this);
	cmdHelp.setHeader("&3 ---- &eSwornGuns Help &3-- &e{1}&3/&e{2} &3----");
	commandHandler.registerPrefixedCommand(cmdHelp);

	commandHandler.registerPrefixedCommand(new CmdList(this));
	commandHandler.registerPrefixedCommand(new CmdReload(this));
	commandHandler.registerPrefixedCommand(new CmdToggle(this));
	commandHandler.registerPrefixedCommand(new CmdVersion(this));

	// Register events
	PluginManager pm = getServer().getPluginManager();
	pm.registerEvents(new PlayerListener(this), this);
	pm.registerEvents(new EntityListener(this), this);

	// Files
	File guns = new File(getDataFolder(), "guns");
	if (! guns.exists())
	{
		guns.mkdir();
	}

	File projectile = new File(getDataFolder(), "projectile");
	if (! projectile.exists())
	{
		projectile.mkdir();
	}

	// Load guns
	loadGuns();
	loadProjectiles();

	getOnlinePlayers();

	// Update timer
	new UpdateTimer().runTaskTimer(this, 20L, 1L);

	logHandler.log("{0} has been enabled. Took {1} ms.", getDescription().getFullName(), System.currentTimeMillis() - start);
}
 
开发者ID:dmulloy2,项目名称:SwornGuns,代码行数:67,代码来源:SwornGuns.java


示例3: onEnable

import net.dmulloy2.handlers.PermissionHandler; //导入依赖的package包/类
@Override
public void onEnable()
{
	long start = System.currentTimeMillis();

	// Register handlers
	logHandler = new LogHandler(this);
	commandHandler = new CommandHandler(this);
	permissionHandler = new PermissionHandler("parkour");
	resourceHandler = new ResourceHandler(this);

	// Configuration
	createDirectories();
	saveDefaultConfig();
	loadConfig();

	parkourHandler = new ParkourHandler(this);
	fileHandler = new FileHandler(this);

	updateRewards();
	loadGames();

	// Load signs
	fileHandler.loadSigns();

	// Integration
	setupIntegration();

	// Register commands
	commandHandler.setCommandPrefix("parkour");
	commandHandler.registerPrefixedCommand(new CmdAbandon(this));
	commandHandler.registerPrefixedCommand(new CmdClaim(this));
	commandHandler.registerPrefixedCommand(new CmdCreate(this));
	commandHandler.registerPrefixedCommand(new CmdDelete(this));
	commandHandler.registerPrefixedCommand(new CmdHelp(this));
	commandHandler.registerPrefixedCommand(new CmdJoin(this));
	commandHandler.registerPrefixedCommand(new CmdKick(this));
	commandHandler.registerPrefixedCommand(new CmdLeave(this));
	commandHandler.registerPrefixedCommand(new CmdList(this));
	commandHandler.registerPrefixedCommand(new CmdReload(this));
	commandHandler.registerPrefixedCommand(new CmdSetPoint(this));
	commandHandler.registerPrefixedCommand(new CmdSpawn(this));
	commandHandler.registerPrefixedCommand(new CmdVersion(this));

	// Register listeners
	PluginManager pm = getServer().getPluginManager();
	pm.registerEvents(new PlayerListener(this), this);
	pm.registerEvents(new BlockListener(this), this);

	log("{0} has been enabled. Took {1} ms.", getDescription().getFullName(), System.currentTimeMillis() - start);
}
 
开发者ID:dmulloy2,项目名称:SwornParkour,代码行数:52,代码来源:SwornParkour.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ModifiedSelector类代码示例发布时间:2022-05-22
下一篇:
Java Action类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap