本文整理汇总了Java中net.gravitydevelopment.updater.Updater.UpdateType类的典型用法代码示例。如果您正苦于以下问题:Java UpdateType类的具体用法?Java UpdateType怎么用?Java UpdateType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UpdateType类属于net.gravitydevelopment.updater.Updater包,在下文中一共展示了UpdateType类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onEnable
import net.gravitydevelopment.updater.Updater.UpdateType; //导入依赖的package包/类
@Override
public void onEnable() {
plugin = this;
// Load configs and locale
try {
// Must load configs in this order!
Config.loadConfig();
strings = new Strings();
UUIDManager.loadCache();
HashMap<UUID, Boolean> playerEnables = SLAPI
.loadFile(enabledDataPath);
if (playerEnables != null)
PlayerManager.playerEnables = playerEnables;
} catch (Exception e) {
getLogger()
.severe(ChatColor.DARK_RED
+ "Error loading config and/or localization! BashMultiCommand will now disable!");
e.printStackTrace();
getServer().getPluginManager().disablePlugin(this);
return;
}
// Setup the listeners
chatListener = new ChatListener();
if (loginListener == null)
loginListener = new LoginListener();
// Load updater
if (Config.autoUpdateEnabled)
if (Config.autoDownload)
loadUpdator(Updater.UpdateType.DEFAULT);
else
loadUpdator(Updater.UpdateType.NO_DOWNLOAD);
// Load commands
commandExecutor = new BMCCommandExecutor();
commandExecutor.loadCommands();
getCommand("BashMultiCommand").setExecutor(commandExecutor);
enabled = true;
}
示例2: loadUpdator
import net.gravitydevelopment.updater.Updater.UpdateType; //导入依赖的package包/类
public void loadUpdator(UpdateType updateType) {
if (Config.autoUpdateEnabled)
this.updater = new Updater(BashMultiCommand.plugin, 80942,
BashMultiCommand.plugin.getFile(), updateType, false);
}
示例3: onEnable
import net.gravitydevelopment.updater.Updater.UpdateType; //导入依赖的package包/类
@Override
public void onEnable() {
saveDefaultConfig();
Bukkit.getServer().getPluginManager().registerEvents(this, this);
try {
Metrics metrics = new Metrics(this);
Graph weaponsUsedGraph = metrics.createGraph("TEST");
weaponsUsedGraph.addPlotter(new Metrics.Plotter("1") {
@Override
public int getValue() {
return 4; // Number of players who used a diamond sword
}
});
weaponsUsedGraph.addPlotter(new Metrics.Plotter("2") {
@Override
public int getValue() {
return 17;
}
});
metrics.start();
} catch (IOException e) {
this.getLogger().warning("Couldn't submit stats to Metrics!");
}
@SuppressWarnings("unused")
Updater updater = new Updater(this, 66804, getFile(), UpdateType.DEFAULT, true);
}