本文整理汇总了Java中net.dmulloy2.handlers.ResourceHandler类的典型用法代码示例。如果您正苦于以下问题:Java ResourceHandler类的具体用法?Java ResourceHandler怎么用?Java ResourceHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ResourceHandler类属于net.dmulloy2.handlers包,在下文中一共展示了ResourceHandler类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onEnable
import net.dmulloy2.handlers.ResourceHandler; //导入依赖的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);
}