Java源码示例:cn.nukkit.event.HandlerList
示例1
public void disablePlugin(Plugin plugin) {
if (plugin.isEnabled()) {
try {
plugin.getPluginLoader().disablePlugin(plugin);
} catch (Exception e) {
MainLogger logger = this.server.getLogger();
if (logger != null) {
logger.logException(e);
}
}
this.server.getScheduler().cancelTask(plugin);
HandlerList.unregisterAll(plugin);
for (Permission permission : plugin.getDescription().getPermissions()) {
this.removePermission(permission);
}
}
}
示例2
public static HandlerList getHandlers() {
return handlers;
}
示例3
public static HandlerList getHandlers() {
return handlers;
}
示例4
public static HandlerList getHandlers() {
return handlers;
}
示例5
public static HandlerList getHandlers() {
return handlers;
}
示例6
public static HandlerList getHandlers() {
return handlers;
}
示例7
public static HandlerList getHandlers() {
return handlers;
}
示例8
public static HandlerList getHandlers() {
return handlers;
}
示例9
public static HandlerList getHandlers() {
return handlers;
}
示例10
public static HandlerList getHandlers() {
return handlers;
}
示例11
public static HandlerList getHandlers() {
return handlers;
}
示例12
public static HandlerList getHandlers() {
return handlers;
}
示例13
public static HandlerList getHandlers() {
return handlers;
}
示例14
public static HandlerList getHandlers() {
return handlers;
}
示例15
public static HandlerList getHandlers() {
return handlers;
}
示例16
public static HandlerList getHandlers() {
return handlers;
}
示例17
public static HandlerList getHandlers() {
return handlers;
}
示例18
public static HandlerList getHandlers() {
return handlers;
}
示例19
public static HandlerList getHandlers() {
return handlers;
}
示例20
public static HandlerList getHandlers() {
return handlers;
}
示例21
public static HandlerList getHandlers() {
return handlers;
}
示例22
public static HandlerList getHandlers() {
return handlers;
}
示例23
public static HandlerList getHandlers() {
return handlers;
}
示例24
public static HandlerList getHandlers() {
return handlers;
}
示例25
public void forceShutdown() {
if (this.hasStopped) {
return;
}
try {
if (!this.isRunning) {
//todo sendUsage
}
// clean shutdown of console thread asap
this.console.shutdown();
this.hasStopped = true;
this.shutdown();
if (this.rcon != null) {
this.rcon.close();
}
this.getLogger().debug("Disabling all plugins");
this.pluginManager.disablePlugins();
for (Player player : new ArrayList<>(this.players.values())) {
player.close(player.getLeaveMessage(), (String) this.getConfig("settings.shutdown-message", "Server closed"));
}
this.getLogger().debug("Unloading all levels");
for (Level level : this.levelArray) {
this.unloadLevel(level, true);
}
this.getLogger().debug("Removing event handlers");
HandlerList.unregisterAll();
this.getLogger().debug("Stopping all tasks");
this.scheduler.cancelAllTasks();
this.scheduler.mainThreadHeartbeat(Integer.MAX_VALUE);
this.getLogger().debug("Closing console");
this.console.interrupt();
this.getLogger().debug("Stopping network interfaces");
for (SourceInterface interfaz : this.network.getInterfaces()) {
interfaz.shutdown();
this.network.unregisterInterface(interfaz);
}
this.getLogger().debug("Disabling timings");
Timings.stopServer();
//todo other things
} catch (Exception e) {
this.logger.logException(e); //todo remove this?
this.logger.emergency("Exception happened while shutting down, exit the process");
System.exit(1);
}
}
示例26
public static HandlerList getHandlers() {
return handlers;
}
示例27
public static HandlerList getHandlers() {
return handlers;
}
示例28
public static HandlerList getHandlers() {
return handlers;
}
示例29
public static HandlerList getHandlers() {
return handlers;
}
示例30
public static HandlerList getHandlers() {
return handlers;
}