本文整理汇总了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;未经允许,请勿转载。 |
请发表评论