mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 21:44:40 +01:00
onDisable on stop - stephank
This commit is contained in:
parent
105a14d6d1
commit
cab61f169e
2 changed files with 8 additions and 0 deletions
|
@ -160,6 +160,10 @@ public class MinecraftServer implements ICommandListener, Runnable {
|
||||||
|
|
||||||
private void g() {
|
private void g() {
|
||||||
a.info("Stopping server");
|
a.info("Stopping server");
|
||||||
|
if(server != null) {
|
||||||
|
server.disablePlugins();
|
||||||
|
}
|
||||||
|
|
||||||
if (f != null) {
|
if (f != null) {
|
||||||
f.d();
|
f.d();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,10 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void disablePlugins() {
|
||||||
|
pluginManager.disablePlugins();
|
||||||
|
}
|
||||||
|
|
||||||
private void loadPlugin(Plugin plugin) {
|
private void loadPlugin(Plugin plugin) {
|
||||||
List<Command> pluginCommands = PluginCommandYamlParser.parse(plugin);
|
List<Command> pluginCommands = PluginCommandYamlParser.parse(plugin);
|
||||||
if (!pluginCommands.isEmpty()) {
|
if (!pluginCommands.isEmpty()) {
|
||||||
|
|
Loading…
Reference in a new issue