|
1 | 1 | --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
2 | 2 | +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
3 |
| -@@ -428,6 +_,20 @@ |
| 3 | +@@ -423,6 +_,20 @@ |
4 | 4 | this.paperPluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(this, this.commandMap, pluginManager);
|
5 | 5 | this.pluginManager.paperPluginManager = this.paperPluginManager;
|
6 | 6 | // Paper end
|
|
21 | 21 |
|
22 | 22 | CraftRegistry.setMinecraftRegistry(console.registryAccess());
|
23 | 23 |
|
24 |
| -@@ -1069,6 +_,7 @@ |
| 24 | +@@ -1064,6 +_,7 @@ |
25 | 25 |
|
26 | 26 | org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
27 | 27 | this.console.paperConfigurations.reloadConfigs(this.console);
|
28 | 28 | + org.purpurmc.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur - Purpur config files
|
29 | 29 | for (ServerLevel world : this.console.getAllLevels()) {
|
30 | 30 | // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
31 | 31 | world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
32 |
| -@@ -1084,6 +_,7 @@ |
| 32 | +@@ -1079,6 +_,7 @@ |
33 | 33 | }
|
34 | 34 | }
|
35 | 35 | world.spigotConfig.init(); // Spigot
|
36 | 36 | + world.purpurConfig.init(); // Purpur - Purpur config files
|
37 | 37 | }
|
38 | 38 |
|
39 | 39 | Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
40 |
| -@@ -1101,6 +_,7 @@ |
| 40 | +@@ -1096,6 +_,7 @@ |
41 | 41 | org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
42 | 42 | io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
|
43 | 43 | this.spark.registerCommandBeforePlugins(this); // Paper - spark
|
44 | 44 | + org.purpurmc.purpur.PurpurConfig.registerCommands(); // Purpur - Purpur config files
|
45 | 45 | this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
46 | 46 | this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
47 | 47 |
|
48 |
| -@@ -1600,6 +_,60 @@ |
| 48 | +@@ -1595,6 +_,60 @@ |
49 | 49 | return true;
|
50 | 50 | }
|
51 | 51 |
|
|
106 | 106 | @Override
|
107 | 107 | public List<Recipe> getRecipesFor(ItemStack result) {
|
108 | 108 | Preconditions.checkArgument(result != null, "ItemStack cannot be null");
|
109 |
| -@@ -2955,6 +_,18 @@ |
| 109 | +@@ -2947,6 +_,18 @@ |
110 | 110 | return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
111 | 111 | }
|
112 | 112 |
|
|
125 | 125 | @Override
|
126 | 126 | public void restart() {
|
127 | 127 | CraftServer.this.restart();
|
128 |
| -@@ -2988,6 +_,7 @@ |
| 128 | +@@ -2979,6 +_,7 @@ |
129 | 129 | @Override
|
130 | 130 | public double[] getTPS() {
|
131 | 131 | return new double[] {
|
132 | 132 | + net.minecraft.server.MinecraftServer.getServer().tps5s.getAverage(), // Purpur - Add 5 second tps average in /tps
|
133 | 133 | net.minecraft.server.MinecraftServer.getServer().tps1.getAverage(),
|
134 | 134 | net.minecraft.server.MinecraftServer.getServer().tps5.getAverage(),
|
135 | 135 | net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
136 |
| -@@ -3195,4 +_,18 @@ |
| 136 | +@@ -3186,4 +_,18 @@ |
137 | 137 | public void allowPausing(final Plugin plugin, final boolean value) {
|
138 | 138 | this.console.addPluginAllowingSleep(plugin.getName(), value);
|
139 | 139 | }
|
|
0 commit comments