本文整理汇总了Java中cn.nukkit.plugin.JavaPluginLoader类的典型用法代码示例。如果您正苦于以下问题:Java JavaPluginLoader类的具体用法?Java JavaPluginLoader怎么用?Java JavaPluginLoader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JavaPluginLoader类属于cn.nukkit.plugin包,在下文中一共展示了JavaPluginLoader类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: reload
import cn.nukkit.plugin.JavaPluginLoader; //导入依赖的package包/类
public void reload() {
this.logger.info("Reloading...");
this.logger.info("Saving levels...");
for (Level level : this.levels.values()) {
level.save();
}
this.pluginManager.disablePlugins();
this.pluginManager.clearPlugins();
this.commandMap.clearCommands();
this.logger.info("Reloading properties...");
this.properties.reload();
this.maxPlayers = this.getPropertyInt("max-players", 20);
if (this.getPropertyBoolean("hardcore", false) && this.getDifficulty() < 3) {
this.setPropertyInt("difficulty", 3);
}
this.banByIP.load();
this.banByName.load();
this.reloadWhitelist();
this.operators.reload();
for (BanEntry entry : this.getIPBans().getEntires().values()) {
this.getNetwork().blockAddress(entry.getName(), -1);
}
this.pluginManager.registerInterface(JavaPluginLoader.class);
this.pluginManager.loadPlugins(this.pluginPath);
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
Timings.reset();
}
示例2: reload
import cn.nukkit.plugin.JavaPluginLoader; //导入依赖的package包/类
/**
* サーバーを再読み込みさせます。
* @return void
*/
public void reload() {
this.logger.info("再読み込み中...");
this.logger.info("ワールドを保存しています...");
for (Level level : this.levels.values()) {
level.save();
}
this.pluginManager.disablePlugins();
this.pluginManager.clearPlugins();
this.commandMap.clearCommands();
this.logger.info("server.propertiesを再読み込みしています...");
this.properties.reload();
this.maxPlayers = this.getPropertyInt("max-players", 20);
if (this.getPropertyBoolean("hardcore", false) && this.getDifficulty() < 3) {
this.setPropertyInt("difficulty", 3);
}
this.banByIP.load();
this.banByName.load();
this.reloadWhitelist();
this.operators.reload();
for (BanEntry entry : this.getIPBans().getEntires().values()) {
this.getNetwork().blockAddress(entry.getName(), -1);
}
this.pluginManager.registerInterface(JavaPluginLoader.class);
this.pluginManager.loadPlugins(this.pluginPath);
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
Timings.reset();
}
示例3: reload
import cn.nukkit.plugin.JavaPluginLoader; //导入依赖的package包/类
public void reload() {
this.logger.info("Reloading...");
this.logger.info("Saving and unloading levels...");
for (Level level : this.levels.values()) {
if(this.autoSave) level.save();
if(!defaultLevel.equals(level)) this.unloadLevel(level);
}
this.pluginManager.disablePlugins();
this.pluginManager.clearPlugins();
this.commandMap.clearCommands();
this.logger.info("Reloading properties...");
this.properties.reload();
this.maxPlayers = this.getPropertyInt("max-players", 20);
if (this.getPropertyBoolean("hardcore", false) && this.getDifficulty() < 3) {
this.setPropertyInt("difficulty", 3);
}
this.banByIP.load();
this.banByName.load();
this.reloadWhitelist();
this.operators.reload();
for (BanEntry entry : this.getIPBans().getEntires().values()) {
this.getNetwork().blockAddress(entry.getName(), -1);
}
this.pluginManager.registerInterface(JavaPluginLoader.class);
this.pluginManager.loadPlugins(this.pluginPath);
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
Timings.reset();
}