mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
Fix Inconsistencies with Paper Plugin Names (#9098)
This commit is contained in:
parent
6d2121efde
commit
dd216c1f09
@ -56,4 +56,5 @@ Kieran Wallbanks <kieran.wallbanks@gmail.com>
|
||||
Denery <dorofeevij@gmail.com>
|
||||
Jakubk15 <jakubk15@protonmail.com>
|
||||
Redned <redned235@gmail.com>
|
||||
Luke Chambers <consolelogluke@gmail.com>
|
||||
```
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Paper Plugins
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index bb1f3b3d5a22ca391f4362e5d4cf016e7e9be0e3..f900b73c52971fe682171e7f99246afdb8b080f3 100644
|
||||
index cff3eb363b17c2a8245b3b2ceb02cbdc1efe3896..03b2fc4c6dd9cbc9f28add7da9420c816f8faa2b 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -45,7 +45,7 @@ dependencies {
|
||||
|
@ -594,7 +594,7 @@ index 0000000000000000000000000000000000000000..89bf48fd581ee6580b91e2eb31dd532c
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/bootstrap/PluginProviderContextImpl.java b/src/main/java/io/papermc/paper/plugin/bootstrap/PluginProviderContextImpl.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..2e450a9fce66e63ec94ee3d2579265eda28a1c3f
|
||||
index 0000000000000000000000000000000000000000..deffde92350f7c74694c2aa69799de446a3c3e0a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/bootstrap/PluginProviderContextImpl.java
|
||||
@@ -0,0 +1,45 @@
|
||||
@ -612,13 +612,13 @@ index 0000000000000000000000000000000000000000..2e450a9fce66e63ec94ee3d2579265ed
|
||||
+ ComponentLogger logger, Path pluginSource) implements PluginProviderContext {
|
||||
+
|
||||
+ public static PluginProviderContextImpl of(PluginMeta config, ComponentLogger logger, Path pluginSource) {
|
||||
+ Path dataFolder = PluginInitializerManager.instance().pluginDirectoryPath().resolve(config.getDisplayName());
|
||||
+ Path dataFolder = PluginInitializerManager.instance().pluginDirectoryPath().resolve(config.getName());
|
||||
+
|
||||
+ return new PluginProviderContextImpl(config, dataFolder, logger, pluginSource);
|
||||
+ }
|
||||
+
|
||||
+ public static PluginProviderContextImpl of(PluginProvider<?> provider, Path pluginFolder) {
|
||||
+ Path dataFolder = pluginFolder.resolve(provider.getMeta().getDisplayName());
|
||||
+ Path dataFolder = pluginFolder.resolve(provider.getMeta().getName());
|
||||
+
|
||||
+ return new PluginProviderContextImpl(provider.getMeta(), dataFolder, provider.getLogger(), provider.getSource());
|
||||
+ }
|
||||
@ -813,7 +813,7 @@ index 0000000000000000000000000000000000000000..f9a2c55a354c877749db3f92956de802
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperPluginClassLoader.java b/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperPluginClassLoader.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..79995ab1b624d7c7aaaa467a86255ad97385cf72
|
||||
index 0000000000000000000000000000000000000000..56fc3e0984861e8ddb597cad3c0a0e0aca9606e6
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperPluginClassLoader.java
|
||||
@@ -0,0 +1,207 @@
|
||||
@ -966,7 +966,7 @@ index 0000000000000000000000000000000000000000..79995ab1b624d7c7aaaa467a86255ad9
|
||||
+ PluginMeta config = this.configuration;
|
||||
+ PluginDescriptionFile pluginDescriptionFile = new PluginDescriptionFile(
|
||||
+ config.getName(),
|
||||
+ config.getName().replace('_', ' '),
|
||||
+ config.getName(),
|
||||
+ config.getProvidedPlugins(),
|
||||
+ config.getMainClass(),
|
||||
+ "", // Classloader load order api
|
||||
@ -4387,12 +4387,13 @@ index 0000000000000000000000000000000000000000..e3430f535e8e9c3b8b44bf2daece8c47
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java b/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..7605efe37ac4a63cb95c8c64c576e93c0e676cc0
|
||||
index 0000000000000000000000000000000000000000..95cc4dbe336e37f01d9f478068fd21a387754a91
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java
|
||||
@@ -0,0 +1,227 @@
|
||||
@@ -0,0 +1,232 @@
|
||||
+package io.papermc.paper.plugin.provider.configuration;
|
||||
+
|
||||
+import com.google.common.base.Preconditions;
|
||||
+import com.google.common.collect.ImmutableList;
|
||||
+import io.leangen.geantyref.TypeToken;
|
||||
+import io.papermc.paper.configuration.constraint.Constraint;
|
||||
@ -4411,6 +4412,7 @@ index 0000000000000000000000000000000000000000..7605efe37ac4a63cb95c8c64c576e93c
|
||||
+import org.bukkit.plugin.PluginLoadOrder;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+import org.jetbrains.annotations.TestOnly;
|
||||
+import org.spongepowered.configurate.CommentedConfigurationNode;
|
||||
+import org.spongepowered.configurate.ConfigurateException;
|
||||
+import org.spongepowered.configurate.loader.HeaderMode;
|
||||
@ -4456,8 +4458,6 @@ index 0000000000000000000000000000000000000000..7605efe37ac4a63cb95c8c64c576e93c
|
||||
+ @PluginConfigConstraints.PluginVersion
|
||||
+ private String apiVersion;
|
||||
+
|
||||
+ private transient String displayName;
|
||||
+
|
||||
+ public PaperPluginMeta() {
|
||||
+ }
|
||||
+
|
||||
@ -4500,8 +4500,6 @@ index 0000000000000000000000000000000000000000..7605efe37ac4a63cb95c8c64c576e93c
|
||||
+ .build();
|
||||
+ }
|
||||
+
|
||||
+ pluginConfiguration.displayName = pluginConfiguration.name.replace('_', ' ') + " v" + pluginConfiguration.version;
|
||||
+
|
||||
+ return pluginConfiguration;
|
||||
+ }
|
||||
+
|
||||
@ -4510,6 +4508,12 @@ index 0000000000000000000000000000000000000000..7605efe37ac4a63cb95c8c64c576e93c
|
||||
+ return this.name;
|
||||
+ }
|
||||
+
|
||||
+ @TestOnly
|
||||
+ public void setName(@NotNull String name) {
|
||||
+ Preconditions.checkNotNull(name, "name");
|
||||
+ this.name = name;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull String getMainClass() {
|
||||
+ return this.main;
|
||||
@ -4520,9 +4524,10 @@ index 0000000000000000000000000000000000000000..7605efe37ac4a63cb95c8c64c576e93c
|
||||
+ return this.version;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull String getDisplayName() {
|
||||
+ return this.displayName;
|
||||
+ @TestOnly
|
||||
+ public void setVersion(@NotNull String version) {
|
||||
+ Preconditions.checkNotNull(version, "version");
|
||||
+ this.version = version;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@ -7052,6 +7057,40 @@ index 0000000000000000000000000000000000000000..726eba26470e62b0e94a91418512e242
|
||||
+ assertThat(pm.getPermissions(), is(empty()));
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java b/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..860a2bc8200cf41b216a2e37cfbd2f5464d6542c
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java
|
||||
@@ -0,0 +1,28 @@
|
||||
+package io.papermc.paper.plugin;
|
||||
+
|
||||
+import io.papermc.paper.plugin.provider.configuration.PaperPluginMeta;
|
||||
+import org.junit.Assert;
|
||||
+import org.junit.Test;
|
||||
+
|
||||
+public class PluginNamingTest {
|
||||
+ private static final String TEST_NAME = "Test_Plugin";
|
||||
+ private static final String TEST_VERSION = "1.0";
|
||||
+
|
||||
+ private final PaperPluginMeta pluginMeta;
|
||||
+
|
||||
+ public PluginNamingTest() {
|
||||
+ this.pluginMeta = new PaperPluginMeta();
|
||||
+ this.pluginMeta.setName(TEST_NAME);
|
||||
+ this.pluginMeta.setVersion(TEST_VERSION);
|
||||
+ }
|
||||
+
|
||||
+ @Test
|
||||
+ public void testName() {
|
||||
+ Assert.assertEquals(TEST_NAME, this.pluginMeta.getName());
|
||||
+ }
|
||||
+
|
||||
+ @Test
|
||||
+ public void testDisplayName() {
|
||||
+ Assert.assertEquals(TEST_NAME + " v" + TEST_VERSION, this.pluginMeta.getDisplayName());
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java b/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..51c08740edffd152c8e2b6d3676ff7f1ce6090c6
|
||||
|
@ -22,10 +22,10 @@ index e189de6d2aa94e9bbb20f1477ee2e34431adb324..4a58843f7ce2dd9e50f9daf3065d056a
|
||||
// CraftBukkit end
|
||||
if (this.getConnection() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bec471a617780e4fa88d4c559c42175370687d7b..9e278a740cf7cb7a593d76f01d6aa590407b087b 100644
|
||||
index 4d51834b6e7bc9058579ce5c6b88f5e9e1c3155d..670ad9f79e2430e956ef204c7e7bf0c651810c06 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1002,6 +1002,35 @@ public final class CraftServer implements Server {
|
||||
@@ -1002,6 +1002,31 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
|
||||
}
|
||||
|
||||
@ -44,14 +44,10 @@ index bec471a617780e4fa88d4c559c42175370687d7b..9e278a740cf7cb7a593d76f01d6aa590
|
||||
+ List<BukkitWorker> overdueWorkers = getScheduler().getActiveWorkers();
|
||||
+ for (BukkitWorker worker : overdueWorkers) {
|
||||
+ Plugin plugin = worker.getOwner();
|
||||
+ String author = "<NoAuthorGiven>";
|
||||
+ if (plugin.getDescription().getAuthors().size() > 0) {
|
||||
+ author = plugin.getDescription().getAuthors().get(0);
|
||||
+ }
|
||||
+ getLogger().log(Level.SEVERE, String.format(
|
||||
+ "Nag author: '%s' of '%s' about the following: %s",
|
||||
+ author,
|
||||
+ plugin.getDescription().getName(),
|
||||
+ "Nag author(s): '%s' of '%s' about the following: %s",
|
||||
+ plugin.getPluginMeta().getAuthors(),
|
||||
+ plugin.getPluginMeta().getDisplayName(),
|
||||
+ "This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
|
||||
+ ));
|
||||
+ }
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7971be6c5e9daa6d7f206aafac7479bd5cc0aad5..a133e0a0a7a5b646ac3df9c2521d4deed6a1761d 100644
|
||||
index 24f0e19f0ce76d9efa2acae2d8514c97cd4415fa..689ee858c4c0635f03390d30f84f635be4758c49 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1812,6 +1812,28 @@ public final class CraftServer implements Server {
|
||||
@@ -1808,6 +1808,28 @@ public final class CraftServer implements Server {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -20,10 +20,10 @@ index 9db48bd6dcf0d24132123b86670341c1d8113840..d7ac103b82e9aac1e2f3b807d7b69fdf
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a133e0a0a7a5b646ac3df9c2521d4deed6a1761d..574f50314c17eb12b519ba14fb1dddbc6c8e40c6 100644
|
||||
index 689ee858c4c0635f03390d30f84f635be4758c49..90230aec6707400fe07ab4431235b4f6383bdac0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1134,9 +1134,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1130,9 +1130,15 @@ public final class CraftServer implements Server {
|
||||
File folder = new File(this.getWorldContainer(), name);
|
||||
World world = this.getWorld(name);
|
||||
|
||||
@ -41,7 +41,7 @@ index a133e0a0a7a5b646ac3df9c2521d4deed6a1761d..574f50314c17eb12b519ba14fb1dddbc
|
||||
|
||||
if ((folder.exists()) && (!folder.isDirectory())) {
|
||||
throw new IllegalArgumentException("File exists with the name '" + name + "' and isn't a folder");
|
||||
@@ -1225,7 +1231,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1221,7 +1227,7 @@ public final class CraftServer implements Server {
|
||||
} else if (name.equals(levelName + "_the_end")) {
|
||||
worldKey = net.minecraft.world.level.Level.END;
|
||||
} else {
|
||||
@ -50,7 +50,7 @@ index a133e0a0a7a5b646ac3df9c2521d4deed6a1761d..574f50314c17eb12b519ba14fb1dddbc
|
||||
}
|
||||
|
||||
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
|
||||
@@ -1317,6 +1323,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1313,6 +1319,15 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..cf4374493c11057451a62a655514415c
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 574f50314c17eb12b519ba14fb1dddbc6c8e40c6..a8116749fb7a2b30e2623165eedb9ee167ee6120 100644
|
||||
index 90230aec6707400fe07ab4431235b4f6383bdac0..d3256d726dda08da8f3e9facfd2cb242c2c08655 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -291,6 +291,7 @@ public final class CraftServer implements Server {
|
||||
@ -111,7 +111,7 @@ index 574f50314c17eb12b519ba14fb1dddbc6c8e40c6..a8116749fb7a2b30e2623165eedb9ee1
|
||||
}
|
||||
|
||||
public boolean getCommandBlockOverride(String command) {
|
||||
@@ -2778,5 +2780,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2774,5 +2776,11 @@ public final class CraftServer implements Server {
|
||||
public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
|
||||
return mobGoals;
|
||||
}
|
||||
|
@ -359,10 +359,10 @@ index b294ef87fb93e7f4651dc04128124f297575860d..65fd57609e45ccd49ebfc1ba80d25243
|
||||
return this.regionCache.getAndMoveToFirst(ChunkPos.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ()));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 418af5eca12c17c95fb5ec8f6af761372d84a4c1..cfa6915e17d2fcc0cac4030aef8a71503df89e85 100644
|
||||
index d3256d726dda08da8f3e9facfd2cb242c2c08655..a469b39c47b1b9feba344672646ee14c11b42a81 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1210,12 +1210,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1206,12 +1206,7 @@ public final class CraftServer implements Server {
|
||||
worlddata.customDimensions = iregistry;
|
||||
worlddata.checkName(name);
|
||||
worlddata.setModdedInfo(this.console.getServerModName(), this.console.getModdedStatus().shouldReportAsModified());
|
||||
@ -376,7 +376,7 @@ index 418af5eca12c17c95fb5ec8f6af761372d84a4c1..cfa6915e17d2fcc0cac4030aef8a7150
|
||||
|
||||
long j = BiomeManager.obfuscateSeed(creator.seed());
|
||||
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata));
|
||||
@@ -1226,6 +1221,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1222,6 +1217,13 @@ public final class CraftServer implements Server {
|
||||
biomeProvider = generator.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add System.out/err catcher
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/logging/SysoutCatcher.java b/src/main/java/io/papermc/paper/logging/SysoutCatcher.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..76d0d00cd6742991e3f3ec827a75ee87d856b6c9
|
||||
index 0000000000000000000000000000000000000000..a8e813ca89b033f061e695288b3383bdcf128531
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/logging/SysoutCatcher.java
|
||||
@@ -0,0 +1,94 @@
|
||||
@ -88,8 +88,8 @@ index 0000000000000000000000000000000000000000..76d0d00cd6742991e3f3ec827a75ee87
|
||||
+ Bukkit.getLogger().warning(
|
||||
+ String.format("Nag author(s): '%s' of '%s' about their usage of System.out/err.print. "
|
||||
+ + "Please use your plugin's logger instead (JavaPlugin#getLogger).",
|
||||
+ plugin.getDescription().getAuthors(),
|
||||
+ plugin.getName())
|
||||
+ plugin.getPluginMeta().getAuthors(),
|
||||
+ plugin.getPluginMeta().getDisplayName())
|
||||
+ );
|
||||
+ } catch (final IllegalArgumentException | IllegalStateException e) {
|
||||
+ // If anything happens, the calling class doesn't exist, there is no JavaPlugin that "owns" the calling class, etc
|
||||
@ -105,7 +105,7 @@ index 0000000000000000000000000000000000000000..76d0d00cd6742991e3f3ec827a75ee87
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 29d8b20d1e90b0097a98f454f2f1209b27fdfa61..a6be09d67043343dc26942d9a0a4d6cebdd6b627 100644
|
||||
index 8e07aadd4225df5a7f5ac95de6a91309ed036ffa..e90ddf2f2039a954971f23a6dc28d460ab6f18b2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -293,6 +293,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -278,10 +278,10 @@ index a1770e5ae4b3014c3538b52d4912c60864e186a8..906def91bba96bab7c7aea9b87d9ec56
|
||||
// Paper start - add parameters and int ret type
|
||||
spawnCategoryForChunk(group, world, chunk, checker, runner, Integer.MAX_VALUE, null);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 46755f34fb0af5dea2db8d8321caebfc163a8268..9b3f01e84b5855b64e9f59ca29e5ff9a598084a4 100644
|
||||
index 4fcfad88374430b03e6ea8aa4a45e110f644a36b..5c4221f8ea476ea218a6222904c6af3841bdb1dc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2165,6 +2165,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2161,6 +2161,11 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public int getSpawnLimit(SpawnCategory spawnCategory) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c9e643ca1a2fab8a314e5f232903b3a54bfd0a76..c997788550f03e3441fc879e281eb54f64a44f01 100644
|
||||
index 5c4221f8ea476ea218a6222904c6af3841bdb1dc..4a37cfddbf152dad5bd315c20d1546e584e62e1a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2337,6 +2337,90 @@ public final class CraftServer implements Server {
|
||||
@@ -2333,6 +2333,90 @@ public final class CraftServer implements Server {
|
||||
return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME), world); // Paper - Anti-Xray - Add parameters
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,10 @@ index 24c88555ea85dd2a0656e1f67a4828a5137157b8..cbbb0ff40488c430d15c2ed054d1b288
|
||||
biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c997788550f03e3441fc879e281eb54f64a44f01..aa460a1c8506b6c499d45f7ee7371ebd540ec7dd 100644
|
||||
index 4a37cfddbf152dad5bd315c20d1546e584e62e1a..d1bfa05340a983fc14c83d85371206d14197059b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1217,7 +1217,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1213,7 +1213,7 @@ public final class CraftServer implements Server {
|
||||
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata));
|
||||
LevelStem worlddimension = iregistry.get(actualDimension);
|
||||
|
||||
|
@ -122,10 +122,10 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index aa460a1c8506b6c499d45f7ee7371ebd540ec7dd..b3de0224b6837022c4f010f84cf51dc20742764f 100644
|
||||
index d1bfa05340a983fc14c83d85371206d14197059b..5704441d2c53bbb5e3eda1c41066299a68e77300 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1999,6 +1999,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1995,6 +1995,13 @@ public final class CraftServer implements Server {
|
||||
return console.console;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit
|
||||
Copies appropriate checks from CraftWorld#getSpawnLimit
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b3de0224b6837022c4f010f84cf51dc20742764f..d55f66b98cc3fc8c8d7beff2f83a3f57cc5d7ca0 100644
|
||||
index 5704441d2c53bbb5e3eda1c41066299a68e77300..81109a840669c18f3af92a29a253ee487e0098dd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2173,6 +2173,8 @@ public final class CraftServer implements Server {
|
||||
@@ -2169,6 +2169,8 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public int getSpawnLimit(SpawnCategory spawnCategory) {
|
||||
// Paper start
|
||||
|
@ -46,10 +46,10 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d55f66b98cc3fc8c8d7beff2f83a3f57cc5d7ca0..a4b537774069dc5b3272e1fc06292d7b3144ff5b 100644
|
||||
index 81109a840669c18f3af92a29a253ee487e0098dd..1938914697c63ac71ac382406d1a47938fa61427 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2583,6 +2583,15 @@ public final class CraftServer implements Server {
|
||||
@@ -2579,6 +2579,15 @@ public final class CraftServer implements Server {
|
||||
return (org.bukkit.Tag<T>) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
|
||||
}
|
||||
}
|
||||
@ -65,7 +65,7 @@ index d55f66b98cc3fc8c8d7beff2f83a3f57cc5d7ca0..a4b537774069dc5b3272e1fc06292d7b
|
||||
default -> throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
@@ -2615,6 +2624,13 @@ public final class CraftServer implements Server {
|
||||
@@ -2611,6 +2620,13 @@ public final class CraftServer implements Server {
|
||||
net.minecraft.core.Registry<EntityType<?>> entityTags = BuiltInRegistries.ENTITY_TYPE;
|
||||
return entityTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftEntityTag(entityTags, pair.getFirst())).collect(ImmutableList.toImmutableList());
|
||||
}
|
||||
|
@ -23,10 +23,10 @@ index 23fce58a5909c5b01a5f0ef6912f90858cd3302c..a30c61e176501d1cbd2e330f85d5d258
|
||||
|
||||
if (worlddata.getCustomBossEvents() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a4b537774069dc5b3272e1fc06292d7b3144ff5b..2e88728e57ed95c458d5cd5071a245c280d4952e 100644
|
||||
index 1938914697c63ac71ac382406d1a47938fa61427..e8b8463ff4e896aaa3dcbb045bc94d2c5cb1ecb7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1246,10 +1246,11 @@ public final class CraftServer implements Server {
|
||||
@@ -1242,10 +1242,11 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -164,7 +164,7 @@ index 424406d2692856cfd82b6f3b7b6228fa3bd20c2f..c57efcb9a79337ec791e4e8f6671612f
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2e88728e57ed95c458d5cd5071a245c280d4952e..339458bea9298de78f6a3c88426dbcd1b9a67cce 100644
|
||||
index e8b8463ff4e896aaa3dcbb045bc94d2c5cb1ecb7..957af0133b0aeb4ec49949433d88e9c49f57faa0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -294,6 +294,7 @@ public final class CraftServer implements Server {
|
||||
@ -184,7 +184,7 @@ index 2e88728e57ed95c458d5cd5071a245c280d4952e..339458bea9298de78f6a3c88426dbcd1
|
||||
MobEffects.BLINDNESS.getClass();
|
||||
PotionEffectType.stopAcceptingRegistrations();
|
||||
// Ugly hack :(
|
||||
@@ -2904,5 +2905,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2900,5 +2901,10 @@ public final class CraftServer implements Server {
|
||||
return datapackManager;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix saving in unloadWorld
|
||||
Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 339458bea9298de78f6a3c88426dbcd1b9a67cce..24d4150240c28741a25bdfe1fd7f3a423763bd61 100644
|
||||
index 957af0133b0aeb4ec49949433d88e9c49f57faa0..1bd1565b02fdcf22e0cb550290ad1ae792002cc0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1294,7 +1294,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1290,7 +1290,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
try {
|
||||
if (save) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 24d4150240c28741a25bdfe1fd7f3a423763bd61..0d2c4bc4674fb2ad2a024994c07d62d16bdf6662 100644
|
||||
index 1bd1565b02fdcf22e0cb550290ad1ae792002cc0..733b18de16e7924ae81a9255bcd061f95628630f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1253,6 +1253,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1249,6 +1249,7 @@ public final class CraftServer implements Server {
|
||||
internal.setSpawnSettings(true, true);
|
||||
// Paper - move up
|
||||
|
||||
|
@ -45,7 +45,7 @@ index 3e59620c84b3aa93d8ce41b0e9901a1621bb48df..682005e4b19ba3959d4e3a66475487da
|
||||
this.profiler.popPush("connection");
|
||||
MinecraftTimings.connectionTimer.startTiming(); // Spigot
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0d2c4bc4674fb2ad2a024994c07d62d16bdf6662..fc5e363dec88d5a45d9cb788779b9cb5980b5ff5 100644
|
||||
index 733b18de16e7924ae81a9255bcd061f95628630f..3713ce052cef9ccbee951473556cba6e0d1b485f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -845,6 +845,11 @@ public final class CraftServer implements Server {
|
||||
@ -60,7 +60,7 @@ index 0d2c4bc4674fb2ad2a024994c07d62d16bdf6662..fc5e363dec88d5a45d9cb788779b9cb5
|
||||
public DedicatedPlayerList getHandle() {
|
||||
return this.playerList;
|
||||
}
|
||||
@@ -1130,6 +1135,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1126,6 +1131,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public World createWorld(WorldCreator creator) {
|
||||
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
|
||||
@ -68,7 +68,7 @@ index 0d2c4bc4674fb2ad2a024994c07d62d16bdf6662..fc5e363dec88d5a45d9cb788779b9cb5
|
||||
Validate.notNull(creator, "Creator may not be null");
|
||||
|
||||
String name = creator.name();
|
||||
@@ -1268,6 +1274,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1264,6 +1270,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean unloadWorld(World world, boolean save) {
|
||||
|
@ -20,10 +20,10 @@ index 7c7e5f3c0f9cd1f16192a8fc8163da9b2d9519d5..888936385196a178ab8b730fd5e4fff4
|
||||
Date date = new Date();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fc5e363dec88d5a45d9cb788779b9cb5980b5ff5..c37cb8a3d7f1d463db8d3719e6a4e00446b32e00 100644
|
||||
index 3713ce052cef9ccbee951473556cba6e0d1b485f..33fe6f01cfef25482001a04bdd82367424d69317 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1772,7 +1772,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1768,7 +1768,7 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
||||
|
Loading…
Reference in New Issue
Block a user