mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-01 00:10:32 +01:00
rebase
This commit is contained in:
parent
f1130aa52e
commit
44c0ce7c65
@ -487,7 +487,7 @@ index 0000000000000000000000000000000000000000..522156e1b7578663c426fcaf7e47acb9
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ac5807723bd95e05265c7ce098909bab91544017
|
||||
index 0000000000000000000000000000000000000000..6b5ea449205603c2b5e1019be03e4618f9e65e15
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -0,0 +1,311 @@
|
||||
@ -802,8 +802,6 @@ index 0000000000000000000000000000000000000000..ac5807723bd95e05265c7ce098909bab
|
||||
+ public boolean disableTripwireUpdates = false;
|
||||
+ public boolean disableChorusPlantUpdates = false;
|
||||
+ public boolean disableMushroomBlockUpdates = false;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/NestedSetting.java b/src/main/java/io/papermc/paper/configuration/NestedSetting.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..69add4a7f1147015806bc9b63a8340d1893356c1
|
||||
@ -4984,7 +4982,7 @@ index 277a66863f76d9a7bf59ca87553fc1d335fc73ca..1b5e2e07a7723f61d4c4d4e3141c60b2
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/Settings.java b/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
index 397c978c71f36c8abe1c52e545699fc7928a6917..d9ad5087d152a2233d16743768d9ce885f32071d 100644
|
||||
index 6d89a5414f46a0c30badb4fcd25bc6cb6d18db3a..0ec3b546db0cf3858dd9cd9ea067d1d6713a8491 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/Settings.java
|
||||
@@ -119,6 +119,7 @@ public abstract class Settings<T extends Settings<T>> {
|
||||
@ -5009,7 +5007,7 @@ index d7c5e872136d0452311b316c5703050c45960230..b84078f8105bccc40da0c14932ad3160
|
||||
this.convertable = convertable_conversionsession;
|
||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 8487fa452e4009c0f2a23a0d4eac4bf56f91447b..81fbc18b0cd9bc443555001947796342be4123b8 100644
|
||||
index ecbb926986bbc0ad6fe108b782cdc17ee8a9f035..b06ffa8d5953c8f0a47daf056495cd424d9ac843 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -155,6 +155,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -22,10 +22,10 @@ is actually processed, this is honestly really just exposed for the misnomers or
|
||||
who just wanna ensure that this won't grow over a specific size if chat gets stupidly active
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index acaa20be47ece35fae693e797df2995c313d6aab..a8894774af42fed6e6c885689fa25324f7445634 100644
|
||||
index 6b5ea449205603c2b5e1019be03e4618f9e65e15..357487acf2853ba84f0e08955a11401826165e08 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -284,7 +284,18 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -286,7 +286,18 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
@PostProcess
|
||||
private void postProcess() {
|
||||
|
@ -17,10 +17,10 @@ index 522156e1b7578663c426fcaf7e47acb93d030486..4495e1e8930619a0d58745cc55c69a5b
|
||||
node = loader.load();
|
||||
this.verifyGlobalConfigVersion(node);
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index d12fd313730c44dcec3c73fcd8c99c0c84f46743..5f59e733c00de9c0f5692b3b3c092a050a9f409f 100644
|
||||
index 357487acf2853ba84f0e08955a11401826165e08..e322db862ef0b87256486e3610e7b63431786dd3 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -25,6 +25,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -26,6 +26,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
static final int CURRENT_VERSION = 29; // (when you change the version, change the comment, so it conflicts on rebases): <insert changes here>
|
||||
private static GlobalConfiguration instance;
|
||||
|
@ -14605,10 +14605,10 @@ index 0000000000000000000000000000000000000000..962d3cae6340fc11607b59355e291629
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index a8894774af42fed6e6c885689fa25324f7445634..3c9f08da21bb50828868d5a0b6a393e36ebd6046 100644
|
||||
index e322db862ef0b87256486e3610e7b63431786dd3..9d7da100e5e3a88148a7a5ca788952349652e077 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -29,6 +29,45 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -30,6 +30,45 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public static GlobalConfiguration get() {
|
||||
return instance;
|
||||
}
|
||||
@ -14654,7 +14654,7 @@ index a8894774af42fed6e6c885689fa25324f7445634..3c9f08da21bb50828868d5a0b6a393e3
|
||||
static void set(GlobalConfiguration instance) {
|
||||
GlobalConfiguration.instance = instance;
|
||||
}
|
||||
@@ -130,21 +169,6 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -131,21 +170,6 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
public int incomingPacketThreshold = 300;
|
||||
}
|
||||
|
||||
@ -14676,7 +14676,7 @@ index a8894774af42fed6e6c885689fa25324f7445634..3c9f08da21bb50828868d5a0b6a393e3
|
||||
public UnsupportedSettings unsupportedSettings;
|
||||
|
||||
public class UnsupportedSettings extends ConfigurationPart {
|
||||
@@ -199,7 +223,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -202,7 +226,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
@PostProcess
|
||||
private void postProcess() {
|
||||
|
@ -5,45 +5,43 @@ Subject: [PATCH] Add RequiredPlugins
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java
|
||||
index eedbf46e04b5ae420f9bedcbc2bbb10643ba7e22..bcc4b62ed0bf3ff82ad86fe9375addd4c833319d 100644
|
||||
index 3e82ea07ca4194844c5528446e2c4a46ff4acee5..a3c4b162111f6c1485efab383dec916fa7e02ee8 100644
|
||||
--- a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java
|
||||
@@ -209,6 +209,11 @@ class PaperPluginInstanceManager {
|
||||
@@ -223,6 +223,9 @@ class PaperPluginInstanceManager {
|
||||
if (!(plugin instanceof JavaPlugin javaPlugin)) {
|
||||
throw new IllegalArgumentException("Only expects java plugins.");
|
||||
}
|
||||
+ // Paper start
|
||||
+ if (!this.server.isStopping() && !((org.bukkit.craftbukkit.CraftServer) this.server).isReloadingPlugins && io.papermc.paper.configuration.GlobalConfiguration.get().misc.requiredPlugins.contains(plugin.getName())) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
if (!plugin.isEnabled()) {
|
||||
return;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9f7ed337463cc9bb370a5541d9de5cd8f9c1a78a..af051867fd6e1c5d96cebdc7671fa75c36e29f54 100644
|
||||
index 05e304f9fc8d0291fa779da589bd060ef4165b49..683802c34b0a0b1f3524958328646e0f07d66c12 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -302,6 +302,7 @@ public final class CraftServer implements Server {
|
||||
@@ -304,6 +304,7 @@ public final class CraftServer implements Server {
|
||||
private boolean overrideAllCommandBlockCommands = false;
|
||||
public boolean ignoreVanillaPermissions = false;
|
||||
private final List<CraftPlayer> playerView;
|
||||
+ public boolean isReloadingPlugins; // Paper
|
||||
+ public boolean isReloadingPlugins; // Paper - Add RequiredPlugins
|
||||
public int reloadCount;
|
||||
private final io.papermc.paper.datapack.PaperDatapackManager datapackManager; // Paper
|
||||
public static Exception excessiveVelEx; // Paper - Velocity warnings
|
||||
@@ -552,6 +553,14 @@ public final class CraftServer implements Server {
|
||||
@@ -553,6 +554,14 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
if (type == PluginLoadOrder.POSTWORLD) {
|
||||
+ // Paper start
|
||||
+ // Paper start - Add RequiredPlugins
|
||||
+ List<String> missingPlugins = new ArrayList<>(io.papermc.paper.configuration.GlobalConfiguration.get().misc.requiredPlugins);
|
||||
+ missingPlugins.removeAll(java.util.Arrays.stream(this.paperPluginManager.getPlugins()).filter(Plugin::isEnabled).map(Plugin::getName).toList());
|
||||
+ if (!missingPlugins.isEmpty()) {
|
||||
+ this.getLogger().severe("The following required plugins aren't enabled: " + String.join(", ", missingPlugins) + ". Stopping Server.");
|
||||
+ this.getServer().stopServer();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Add RequiredPlugins
|
||||
// Spigot start - Allow vanilla commands to be forced to be the main command
|
||||
this.setVanillaCommands(true);
|
||||
this.commandMap.setFallbackCommands();
|
||||
@ -51,7 +49,7 @@ index 9f7ed337463cc9bb370a5541d9de5cd8f9c1a78a..af051867fd6e1c5d96cebdc7671fa75c
|
||||
world.spigotConfig.init(); // Spigot
|
||||
}
|
||||
|
||||
+ this.isReloadingPlugins = true; // Paper
|
||||
+ this.isReloadingPlugins = true; // Paper - Add RequiredPlugins
|
||||
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
||||
this.pluginManager.clearPlugins();
|
||||
this.commandMap.clearCommands();
|
||||
@ -59,7 +57,7 @@ index 9f7ed337463cc9bb370a5541d9de5cd8f9c1a78a..af051867fd6e1c5d96cebdc7671fa75c
|
||||
this.loadPlugins();
|
||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
+ this.isReloadingPlugins = false; // Paper
|
||||
+ this.isReloadingPlugins = false; // Paper - Add RequiredPlugins
|
||||
this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
|
||||
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
|
||||
}
|
Loading…
Reference in New Issue
Block a user