mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 03:32:46 +01:00
Updated Upstream (Bukkit/CraftBukkit) (#9739)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 69c7ce23 PR-990: Use Mockito instead of InvocationHandler for test mocking 997de31d PR-893: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping 6a8ce581 Fix malformed javadoc in previous commit 26c74f6d PR-890: Add more Sculk API (bloom, shriek, bloom event) aa067abf PR-895: Load GameEvent and MusicInstrument from registry CraftBukkit Changes: 78796c9de Add support for Java 21 ddc9a2dad SPIGOT-7475: Don't fire SculkBloomEvent during world generation caee2311a PR-1245: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping de421cf56 PR-1242: Add more Sculk API (bloom, shriek, bloom event) 00f5a80fb PR-1252: Fix error when generating a tree in water 10219df3a PR-1248: Load GameEvent and MusicInstrument from registry
This commit is contained in:
parent
3fd1502717
commit
773dd72446
79 changed files with 306 additions and 602 deletions
|
@ -27,10 +27,10 @@ index 11038da2e071699d6561a331565db0c8d7850d0e..317acfec5894101294a55abff6181943
|
|||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c2e5d8006420aab5a60e5aaa188223aeb0396483
|
||||
index 0000000000000000000000000000000000000000..297c2d28d254f72eb0143d8994a1fb2f39f9b4e8
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,86 @@
|
||||
@@ -0,0 +1,87 @@
|
||||
+plugins {
|
||||
+ `java-library`
|
||||
+ `maven-publish`
|
||||
|
@ -63,6 +63,7 @@ index 0000000000000000000000000000000000000000..c2e5d8006420aab5a60e5aaa188223ae
|
|||
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
+ testImplementation("junit:junit:4.13.2")
|
||||
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
+ testImplementation("org.mockito:mockito-core:5.5.0")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.5")
|
||||
+}
|
||||
+
|
||||
|
@ -119,10 +120,10 @@ index 0000000000000000000000000000000000000000..c2e5d8006420aab5a60e5aaa188223ae
|
|||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index 068987ca1171857fc9996d645e775448a09f0feb..0000000000000000000000000000000000000000
|
||||
index ca29693624f80b54d67bd51c8577ceaa1f5f40c8..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,270 +0,0 @@
|
||||
@@ -1,276 +0,0 @@
|
||||
-
|
||||
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
@ -230,6 +231,12 @@ index 068987ca1171857fc9996d645e775448a09f0feb..00000000000000000000000000000000
|
|||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.mockito</groupId>
|
||||
- <artifactId>mockito-core</artifactId>
|
||||
- <version>5.5.0</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm-tree</artifactId>
|
||||
- <version>9.5</version>
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index c2e5d8006420aab5a60e5aaa188223aeb0396483..394665bf1d4b485bb0cefd24162f1ef4c255f160 100644
|
||||
index 297c2d28d254f72eb0143d8994a1fb2f39f9b4e8..c7f358649935fe4bad002089274b42d03a1c7d88 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -18,15 +18,27 @@ dependencies {
|
||||
|
@ -37,7 +37,7 @@ index c2e5d8006420aab5a60e5aaa188223aeb0396483..394665bf1d4b485bb0cefd24162f1ef4
|
|||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
@@ -68,8 +80,12 @@ tasks.withType<Javadoc> {
|
||||
@@ -69,8 +81,12 @@ tasks.withType<Javadoc> {
|
||||
options.links(
|
||||
"https://guava.dev/releases/31.1-jre/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
|
||||
|
@ -51,7 +51,7 @@ index c2e5d8006420aab5a60e5aaa188223aeb0396483..394665bf1d4b485bb0cefd24162f1ef4
|
|||
)
|
||||
options.tags("apiNote:a:API Note:")
|
||||
|
||||
@@ -84,3 +100,14 @@ tasks.withType<Javadoc> {
|
||||
@@ -85,3 +101,14 @@ tasks.withType<Javadoc> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,47 +12,6 @@ Subject: [PATCH] Test changes
|
|||
Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index ffd1c792b0e0fe1ed3da85cf933202c5193734ce..b38a9f4d628fa639e5d2b7dcd5a63f0bf6b8330b 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -38,6 +38,7 @@ dependencies {
|
||||
compileOnlyApi(checkerQual)
|
||||
testCompileOnly(checkerQual)
|
||||
// Paper end
|
||||
+ testImplementation("org.mockito:mockito-core:4.9.0") // Paper - add mockito
|
||||
|
||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/EmptyRegistry.java b/src/test/java/io/papermc/paper/testing/EmptyRegistry.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ba9ddce87a9f385e729a5c2cf7c5eec120e388a7
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/testing/EmptyRegistry.java
|
||||
@@ -0,0 +1,23 @@
|
||||
+package io.papermc.paper.testing;
|
||||
+
|
||||
+import java.util.Collections;
|
||||
+import java.util.Iterator;
|
||||
+import org.bukkit.Keyed;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.Registry;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public record EmptyRegistry() implements Registry<Keyed> {
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Iterator<Keyed> iterator() {
|
||||
+ return Collections.emptyIterator();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @Nullable Keyed get(@NotNull final NamespacedKey key) {
|
||||
+ return null;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/EmptyTag.java b/src/test/java/io/papermc/paper/testing/EmptyTag.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..77154095cfb8b259bdb318e8ff40cb6f559ebc18
|
||||
|
@ -90,60 +49,6 @@ index 0000000000000000000000000000000000000000..77154095cfb8b259bdb318e8ff40cb6f
|
|||
+ return Collections.emptySet();
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/TestServer.java b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..756acf231b1b076b08046d86992ba7ce7f62a94f
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
@@ -0,0 +1,48 @@
|
||||
+package io.papermc.paper.testing;
|
||||
+
|
||||
+import java.util.logging.Logger;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.Server;
|
||||
+import org.bukkit.command.SimpleCommandMap;
|
||||
+import org.bukkit.plugin.PluginManager;
|
||||
+import org.bukkit.plugin.SimplePluginManager;
|
||||
+
|
||||
+import static org.mockito.ArgumentMatchers.anyString;
|
||||
+import static org.mockito.Mockito.any;
|
||||
+import static org.mockito.Mockito.mock;
|
||||
+import static org.mockito.Mockito.when;
|
||||
+
|
||||
+public final class TestServer {
|
||||
+
|
||||
+ @SuppressWarnings("removal")
|
||||
+ public static void setup() {
|
||||
+ //noinspection ConstantValue
|
||||
+ if (Bukkit.getServer() != null) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ final Server dummyServer = mock(Server.class);
|
||||
+
|
||||
+ final Logger logger = Logger.getLogger(TestServer.class.getCanonicalName());
|
||||
+ when(dummyServer.getLogger()).thenReturn(logger);
|
||||
+ when(dummyServer.getName()).thenReturn(TestServer.class.getSimpleName());
|
||||
+ when(dummyServer.getVersion()).thenReturn("Version_" + TestServer.class.getPackage().getImplementationVersion());
|
||||
+ when(dummyServer.getBukkitVersion()).thenReturn("BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion());
|
||||
+
|
||||
+
|
||||
+ final Thread currentThread = Thread.currentThread();
|
||||
+ when(dummyServer.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
|
||||
+
|
||||
+ when(dummyServer.getTag(anyString(), any(NamespacedKey.class), any())).thenAnswer(ignored -> new EmptyTag());
|
||||
+
|
||||
+ final PluginManager pluginManager = new SimplePluginManager(dummyServer, new SimpleCommandMap(dummyServer));
|
||||
+ when(dummyServer.getPluginManager()).thenReturn(pluginManager);
|
||||
+
|
||||
+ when(dummyServer.getRegistry(any())).thenAnswer(ignored -> new EmptyRegistry());
|
||||
+ when(dummyServer.getScoreboardCriteria(anyString())).thenReturn(null);
|
||||
+
|
||||
+ Bukkit.setServer(dummyServer);
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
|
||||
index 4ac3dd977e75cd8464163351d306e037ee32cb48..c26ea217927ba77611e6ae93f8df50a83bceb3dd 100644
|
||||
--- a/src/test/java/org/bukkit/AnnotationTest.java
|
||||
|
@ -311,232 +216,19 @@ index 2dfada66067d79b84cd490eadbe0178e8cd8c260..06d66512c91c680130132b79e34fbf32
|
|||
return Lists.transform(Arrays.asList(Server.class.getDeclaredMethods()), new Function<Method, Object[]>() {
|
||||
@Override
|
||||
public Object[] apply(Method input) {
|
||||
diff --git a/src/test/java/org/bukkit/TestServer.java b/src/test/java/org/bukkit/TestServer.java
|
||||
deleted file mode 100644
|
||||
index 701a17c10f31cd345238a3c568264178ce372faa..0000000000000000000000000000000000000000
|
||||
--- a/src/test/java/org/bukkit/TestServer.java
|
||||
+++ /dev/null
|
||||
@@ -1,139 +0,0 @@
|
||||
-package org.bukkit;
|
||||
-
|
||||
-import com.google.common.collect.ImmutableMap;
|
||||
-import java.lang.reflect.InvocationHandler;
|
||||
-import java.lang.reflect.Method;
|
||||
-import java.lang.reflect.Proxy;
|
||||
-import java.util.Iterator;
|
||||
-import java.util.Map;
|
||||
-import java.util.logging.Logger;
|
||||
-import org.bukkit.command.SimpleCommandMap;
|
||||
-import org.bukkit.plugin.PluginManager;
|
||||
-import org.bukkit.plugin.SimplePluginManager;
|
||||
-import org.jetbrains.annotations.NotNull;
|
||||
-import org.jetbrains.annotations.Nullable;
|
||||
-
|
||||
-public final class TestServer implements InvocationHandler {
|
||||
- private static interface MethodHandler {
|
||||
- Object handle(TestServer server, Object[] args);
|
||||
- }
|
||||
-
|
||||
- private static final Map<Method, MethodHandler> methods;
|
||||
-
|
||||
- static {
|
||||
- try {
|
||||
- ImmutableMap.Builder<Method, MethodHandler> methodMap = ImmutableMap.builder();
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("isPrimaryThread"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return Thread.currentThread().equals(server.creatingThread);
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getPluginManager"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return server.pluginManager;
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getLogger"),
|
||||
- new MethodHandler() {
|
||||
- final Logger logger = Logger.getLogger(TestServer.class.getCanonicalName());
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return logger;
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getName"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return TestServer.class.getSimpleName();
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getVersion"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return "Version_" + TestServer.class.getPackage().getImplementationVersion();
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getBukkitVersion"),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return "BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion();
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getRegistry", Class.class),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- return new Registry() {
|
||||
- @NotNull
|
||||
- @Override
|
||||
- public Iterator iterator() {
|
||||
- return null;
|
||||
- }
|
||||
-
|
||||
- @Nullable
|
||||
- @Override
|
||||
- public Keyed get(@NotNull NamespacedKey key) {
|
||||
- return null;
|
||||
- }
|
||||
- };
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methodMap.put(
|
||||
- Server.class.getMethod("getScoreboardCriteria", String.class),
|
||||
- new MethodHandler() {
|
||||
- @Override
|
||||
- public Object handle(TestServer server, Object[] args) {
|
||||
- // Does not need to return anything. Exists solely to test CriteriaTest which has static init fields
|
||||
- return null;
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- methods = methodMap.build();
|
||||
-
|
||||
- TestServer server = new TestServer();
|
||||
- Server instance = Proxy.getProxyClass(Server.class.getClassLoader(), Server.class).asSubclass(Server.class).getConstructor(InvocationHandler.class).newInstance(server);
|
||||
- Bukkit.setServer(instance);
|
||||
- server.pluginManager = new SimplePluginManager(instance, new SimpleCommandMap(instance));
|
||||
- } catch (Throwable t) {
|
||||
- throw new Error(t);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- private Thread creatingThread = Thread.currentThread();
|
||||
- private PluginManager pluginManager;
|
||||
- private TestServer() {};
|
||||
-
|
||||
- public static Server getInstance() {
|
||||
- return Bukkit.getServer();
|
||||
- }
|
||||
-
|
||||
- @Override
|
||||
- public Object invoke(Object proxy, Method method, Object[] args) {
|
||||
- MethodHandler handler = methods.get(method);
|
||||
- if (handler != null) {
|
||||
- return handler.handle(this, args);
|
||||
- }
|
||||
- throw new UnsupportedOperationException(String.valueOf(method));
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/test/java/org/bukkit/TestWorld.java b/src/test/java/org/bukkit/TestWorld.java
|
||||
index ab34f1199921d415fa2ca6e281a8125c9e6d7173..f64d024f5bbf9482aaddb56597b23b04c66f21bf 100644
|
||||
--- a/src/test/java/org/bukkit/TestWorld.java
|
||||
+++ b/src/test/java/org/bukkit/TestWorld.java
|
||||
@@ -18,7 +18,7 @@ public final class TestWorld implements InvocationHandler {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index 79173d6ed844f1e640e3aa745a9b560ec5e6a2bc..73ec679ac0d1f398b417bd174b47f9af93351e27 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -61,6 +61,11 @@ public final class TestServer {
|
||||
UnsafeValues unsafeValues = mock(withSettings().stubOnly());
|
||||
when(instance.getUnsafe()).thenReturn(unsafeValues);
|
||||
|
||||
static {
|
||||
try {
|
||||
- TestServer.getInstance();
|
||||
+ io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
|
||||
ImmutableMap.Builder<Method, MethodHandler> methodMap = ImmutableMap.builder();
|
||||
methodMap.put(
|
||||
diff --git a/src/test/java/org/bukkit/event/SyntheticEventTest.java b/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
index d402cb59f508205ebe9ee450594826b04cecb90b..09886568ae6167141b463b6262565fa212af3385 100644
|
||||
--- a/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
+++ b/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
@@ -1,6 +1,5 @@
|
||||
package org.bukkit.event;
|
||||
|
||||
-import org.bukkit.TestServer;
|
||||
import org.bukkit.plugin.PluginLoader;
|
||||
import org.bukkit.plugin.SimplePluginManager;
|
||||
import org.bukkit.plugin.TestPlugin;
|
||||
@@ -12,14 +11,15 @@ public class SyntheticEventTest {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void test() {
|
||||
- final JavaPluginLoader loader = new JavaPluginLoader(TestServer.getInstance());
|
||||
+ io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
+ final JavaPluginLoader loader = new JavaPluginLoader(org.bukkit.Bukkit.getServer()); // Paper
|
||||
TestPlugin plugin = new TestPlugin(getClass().getName()) {
|
||||
@Override
|
||||
public PluginLoader getPluginLoader() {
|
||||
return loader;
|
||||
}
|
||||
};
|
||||
- SimplePluginManager pluginManager = new SimplePluginManager(TestServer.getInstance(), null);
|
||||
+ SimplePluginManager pluginManager = new SimplePluginManager(org.bukkit.Bukkit.getServer(), null); // Paper
|
||||
|
||||
TestEvent event = new TestEvent(false);
|
||||
Impl impl = new Impl();
|
||||
diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
index f188cd4f3b07027c30d41f1162db77a506b7b6bb..c46ed2acb82db814d660459b705dd49e6d44240f 100644
|
||||
--- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
+++ b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
@@ -2,7 +2,6 @@ package org.bukkit.plugin;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
-import org.bukkit.TestServer;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.TestEvent;
|
||||
import org.bukkit.permissions.Permission;
|
||||
@@ -14,7 +13,7 @@ public class PluginManagerTest {
|
||||
volatile Object value = null;
|
||||
+ // Paper start - testing changes
|
||||
+ when(instance.getTag(anyString(), any(NamespacedKey.class), any())).thenAnswer(ignored -> new io.papermc.paper.testing.EmptyTag());
|
||||
+ when(instance.getScoreboardCriteria(anyString())).thenReturn(null);
|
||||
+ // Paper end - testing changes
|
||||
+
|
||||
Bukkit.setServer(instance);
|
||||
}
|
||||
|
||||
- private static final PluginManager pm = TestServer.getInstance().getPluginManager();
|
||||
+ private static final PluginManager pm = org.bukkit.Bukkit.getServer().getPluginManager(); // Paper
|
||||
|
||||
private final MutableObject store = new MutableObject();
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/scoreboard/CriteriaTest.java b/src/test/java/org/bukkit/scoreboard/CriteriaTest.java
|
||||
index eb94b6f4d58cd9f66b07791c57af7e359992e28c..a93f28e2f987a36e2c7e4f7d31506b750bdb222b 100644
|
||||
--- a/src/test/java/org/bukkit/scoreboard/CriteriaTest.java
|
||||
+++ b/src/test/java/org/bukkit/scoreboard/CriteriaTest.java
|
||||
@@ -2,7 +2,6 @@ package org.bukkit.scoreboard;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Statistic;
|
||||
-import org.bukkit.TestServer;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
@@ -11,7 +10,7 @@ public class CriteriaTest {
|
||||
|
||||
@Test
|
||||
public void testStatistic() {
|
||||
- TestServer.getInstance();
|
||||
+ io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
|
||||
Assert.assertThrows(IllegalArgumentException.class, () -> Criteria.statistic(Statistic.AVIATE_ONE_CM, Material.STONE)); // Generic statistic with block
|
||||
Assert.assertThrows(IllegalArgumentException.class, () -> Criteria.statistic(Statistic.AVIATE_ONE_CM, EntityType.CREEPER)); // Generic statistic with entity type
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Paper Plugins
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 85e370ab77b7f3ec6c77c1d6750ce220777dbce5..713f5d73743007d47eca70167058f207626d2298 100644
|
||||
index 9c24107008c7fb7a00b8317cc62592af3620dcbe..4cd5514efa238828427ade4fd90ae72b24d7afe2 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -47,7 +47,7 @@ dependencies {
|
||||
|
@ -2276,48 +2276,35 @@ index 2f74ec96ece706de23156ebabfe493211bc05391..302319acbc257a075adfb78d9f5c49fd
|
|||
+
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/TestServer.java b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
index 756acf231b1b076b08046d86992ba7ce7f62a94f..52d27d977b9df0bdf02b33ed0aaa3b4db0a04cb4 100644
|
||||
--- a/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
+++ b/src/test/java/io/papermc/paper/testing/TestServer.java
|
||||
@@ -36,9 +36,6 @@ public final class TestServer {
|
||||
|
||||
when(dummyServer.getTag(anyString(), any(NamespacedKey.class), any())).thenAnswer(ignored -> new EmptyTag());
|
||||
|
||||
- final PluginManager pluginManager = new SimplePluginManager(dummyServer, new SimpleCommandMap(dummyServer));
|
||||
- when(dummyServer.getPluginManager()).thenReturn(pluginManager);
|
||||
-
|
||||
when(dummyServer.getRegistry(any())).thenAnswer(ignored -> new EmptyRegistry());
|
||||
when(dummyServer.getScoreboardCriteria(anyString())).thenReturn(null);
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/event/SyntheticEventTest.java b/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
deleted file mode 100644
|
||||
index 09886568ae6167141b463b6262565fa212af3385..0000000000000000000000000000000000000000
|
||||
index ab53cf14389454d2dd5e71494a90ea7b09963b8f..0000000000000000000000000000000000000000
|
||||
--- a/src/test/java/org/bukkit/event/SyntheticEventTest.java
|
||||
+++ /dev/null
|
||||
@@ -1,48 +0,0 @@
|
||||
@@ -1,49 +0,0 @@
|
||||
-package org.bukkit.event;
|
||||
-
|
||||
-import org.bukkit.Bukkit;
|
||||
-import org.bukkit.plugin.PluginLoader;
|
||||
-import org.bukkit.plugin.SimplePluginManager;
|
||||
-import org.bukkit.plugin.TestPlugin;
|
||||
-import org.bukkit.plugin.java.JavaPluginLoader;
|
||||
-import org.bukkit.support.AbstractTestingBase;
|
||||
-import org.junit.Assert;
|
||||
-import org.junit.Test;
|
||||
-
|
||||
-public class SyntheticEventTest {
|
||||
-public class SyntheticEventTest extends AbstractTestingBase {
|
||||
- @SuppressWarnings("deprecation")
|
||||
- @Test
|
||||
- public void test() {
|
||||
- io.papermc.paper.testing.TestServer.setup(); // Paper
|
||||
- final JavaPluginLoader loader = new JavaPluginLoader(org.bukkit.Bukkit.getServer()); // Paper
|
||||
- final JavaPluginLoader loader = new JavaPluginLoader(Bukkit.getServer());
|
||||
- TestPlugin plugin = new TestPlugin(getClass().getName()) {
|
||||
- @Override
|
||||
- public PluginLoader getPluginLoader() {
|
||||
- return loader;
|
||||
- }
|
||||
- };
|
||||
- SimplePluginManager pluginManager = new SimplePluginManager(org.bukkit.Bukkit.getServer(), null); // Paper
|
||||
- SimplePluginManager pluginManager = new SimplePluginManager(Bukkit.getServer(), null);
|
||||
-
|
||||
- TestEvent event = new TestEvent(false);
|
||||
- Impl impl = new Impl();
|
||||
|
@ -2346,26 +2333,28 @@ index 09886568ae6167141b463b6262565fa212af3385..00000000000000000000000000000000
|
|||
-}
|
||||
diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
deleted file mode 100644
|
||||
index c46ed2acb82db814d660459b705dd49e6d44240f..0000000000000000000000000000000000000000
|
||||
index 4c61b180c2f67205351aac48ebb5e8e9db5ee6d3..0000000000000000000000000000000000000000
|
||||
--- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java
|
||||
+++ /dev/null
|
||||
@@ -1,183 +0,0 @@
|
||||
@@ -1,185 +0,0 @@
|
||||
-package org.bukkit.plugin;
|
||||
-
|
||||
-import static org.hamcrest.Matchers.*;
|
||||
-import static org.junit.Assert.*;
|
||||
-import org.bukkit.Bukkit;
|
||||
-import org.bukkit.event.Event;
|
||||
-import org.bukkit.event.TestEvent;
|
||||
-import org.bukkit.permissions.Permission;
|
||||
-import org.bukkit.support.AbstractTestingBase;
|
||||
-import org.junit.After;
|
||||
-import org.junit.Test;
|
||||
-
|
||||
-public class PluginManagerTest {
|
||||
-public class PluginManagerTest extends AbstractTestingBase {
|
||||
- private class MutableObject {
|
||||
- volatile Object value = null;
|
||||
- }
|
||||
-
|
||||
- private static final PluginManager pm = org.bukkit.Bukkit.getServer().getPluginManager(); // Paper
|
||||
- private static final PluginManager pm = Bukkit.getServer().getPluginManager();
|
||||
-
|
||||
- private final MutableObject store = new MutableObject();
|
||||
-
|
||||
|
@ -2550,3 +2539,17 @@ index a8be3e23e3e280ad301d9530de50028515612966..43b58e920e739bb949ac0673e9ef73ba
|
|||
|
||||
@Override
|
||||
public FileConfiguration getConfig() {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index 73ec679ac0d1f398b417bd174b47f9af93351e27..b208150297a23c0b4acb79135416809718f5650e 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -25,8 +25,7 @@ public final class TestServer {
|
||||
Thread creatingThread = Thread.currentThread();
|
||||
when(instance.isPrimaryThread()).then(mock -> Thread.currentThread().equals(creatingThread));
|
||||
|
||||
- PluginManager pluginManager = new SimplePluginManager(instance, new SimpleCommandMap(instance));
|
||||
- when(instance.getPluginManager()).thenReturn(pluginManager);
|
||||
+ // Paper - remove plugin manager for Paper Plugins
|
||||
|
||||
Logger logger = Logger.getLogger(TestServer.class.getCanonicalName());
|
||||
when(instance.getLogger()).thenReturn(logger);
|
||||
|
|
|
@ -1134,10 +1134,10 @@ index 1504dca4ec3e8d21189b7534bb009521799ffdf7..82d34e9aae42dfafd900dc0e610bf1dc
|
|||
public interface Tag<T extends Keyed> extends Keyed {
|
||||
diff --git a/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java b/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e541f29e983d8dcaca91de9ee1459d587226b4c3
|
||||
index 0000000000000000000000000000000000000000..c248493712a50b18cb860cea4be2add81ca35750
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/com/destroystokyo/paper/MaterialTagsTest.java
|
||||
@@ -0,0 +1,65 @@
|
||||
@@ -0,0 +1,59 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
|
||||
+ */
|
||||
|
@ -1146,9 +1146,8 @@ index 0000000000000000000000000000000000000000..e541f29e983d8dcaca91de9ee1459d58
|
|||
+
|
||||
+import io.papermc.paper.tag.BaseTag;
|
||||
+import io.papermc.paper.tag.EntityTags;
|
||||
+import io.papermc.paper.testing.TestServer;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.junit.Before;
|
||||
+import org.bukkit.support.AbstractTestingBase;
|
||||
+import org.junit.Test;
|
||||
+
|
||||
+import java.lang.reflect.Field;
|
||||
|
@ -1159,12 +1158,7 @@ index 0000000000000000000000000000000000000000..e541f29e983d8dcaca91de9ee1459d58
|
|||
+
|
||||
+import static org.junit.Assert.assertTrue;
|
||||
+
|
||||
+public class MaterialTagsTest {
|
||||
+
|
||||
+ @Before
|
||||
+ public void before() {
|
||||
+ TestServer.setup();
|
||||
+ }
|
||||
+public class MaterialTagsTest extends AbstractTestingBase {
|
||||
+
|
||||
+ @Test
|
||||
+ public void testInitialize() {
|
||||
|
@ -1205,24 +1199,23 @@ index 0000000000000000000000000000000000000000..e541f29e983d8dcaca91de9ee1459d58
|
|||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/EntityTagsTest.java b/src/test/java/io/papermc/paper/EntityTagsTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3caf03d8e50cd2180e9aac2dddeaa3afd0bf7438
|
||||
index 0000000000000000000000000000000000000000..83ecee478f81696f523783974941a8c15ea02e16
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/EntityTagsTest.java
|
||||
@@ -0,0 +1,22 @@
|
||||
@@ -0,0 +1,21 @@
|
||||
+package io.papermc.paper;
|
||||
+
|
||||
+import io.papermc.paper.tag.EntityTags;
|
||||
+import io.papermc.paper.testing.TestServer;
|
||||
+import java.util.logging.Level;
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.support.AbstractTestingBase;
|
||||
+import org.junit.Test;
|
||||
+
|
||||
+public class EntityTagsTest {
|
||||
+public class EntityTagsTest extends AbstractTestingBase {
|
||||
+
|
||||
+ @Test
|
||||
+ public void testInitialize() {
|
||||
+ try {
|
||||
+ TestServer.setup();
|
||||
+ EntityTags.HORSES.getValues();
|
||||
+ assert true;
|
||||
+ } catch (Throwable e) {
|
||||
|
|
|
@ -18,10 +18,10 @@ index 1d061412cdafa28c6940c7433747ab1dabe23de1..6fda7f3aa68e76af64362e9afed70fc6
|
|||
|
||||
@Override
|
||||
diff --git a/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java b/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
|
||||
index dce3d619a6f1791197e44277c2dee9eaf19ff56f..7e2335ed8acc692af1e70eddcf97ee7a56e30f68 100644
|
||||
index bf00b7a9d8fd50fbc79c2dcb3d5698975d685fe5..a6a1a9c451b1543715135de5eebbfb2746fb5464 100644
|
||||
--- a/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
|
||||
+++ b/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java
|
||||
@@ -25,8 +25,8 @@ public class StandardMessengerTest {
|
||||
@@ -26,8 +26,8 @@ public class StandardMessengerTest {
|
||||
assertTrue(messenger.isReservedChannel("minecraft:register"));
|
||||
assertFalse(messenger.isReservedChannel("test:register"));
|
||||
assertTrue(messenger.isReservedChannel("minecraft:unregister"));
|
||||
|
|
|
@ -156,10 +156,10 @@ index f43209cf7b752c26718c303ca8c3e1c7d9912ad3..f0094e6fb05e526736629ad3181c8d2c
|
|||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 6e5e5fecdd7b76dde2e1524fe7b5faa837f491fb..09e3c2872462da546b891cbc396aaffb77f6aadf 100644
|
||||
index 44b8c9111ddc93719d9f3bb23ee1799897389f52..74c81f73649507f21351fc003d00fbeca274d92a 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -157,14 +157,14 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -184,14 +184,14 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see TrimMaterial
|
||||
*/
|
||||
|
@ -176,7 +176,7 @@ index 6e5e5fecdd7b76dde2e1524fe7b5faa837f491fb..09e3c2872462da546b891cbc396aaffb
|
|||
Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
|
||||
/**
|
||||
* Villager profession.
|
||||
@@ -246,8 +246,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -273,8 +273,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @param input non-null input
|
||||
* @return registered object or null if does not exist
|
||||
|
|
|
@ -185,27 +185,27 @@ index 7705fece7f58bd66f7d68da85f8f34e43b4bae12..6a89eab53f21bc4420e616cc299864fb
|
|||
if (this.isItem()) {
|
||||
return Bukkit.getUnsafe().getItemTranslationKey(this);
|
||||
diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java
|
||||
index 614dc9f2ff5aa69659947c3fcedef98f9c9bab98..be5b47659d780ab5f97634fc44faa24456b6ebf0 100644
|
||||
index a7573ce8c6dff9862c97ce74650284b4a42e7989..ee5368372e136541eafe1d7ffb395de670fe4843 100644
|
||||
--- a/src/main/java/org/bukkit/MusicInstrument.java
|
||||
+++ b/src/main/java/org/bukkit/MusicInstrument.java
|
||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
||||
@@ -7,7 +7,7 @@ import java.util.Collections;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
-public final class MusicInstrument implements Keyed {
|
||||
+public final class MusicInstrument implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - translation keys
|
||||
-public abstract class MusicInstrument implements Keyed {
|
||||
+public abstract class MusicInstrument implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - translation keys
|
||||
|
||||
private static final Map<NamespacedKey, MusicInstrument> INSTRUMENTS = new HashMap<>();
|
||||
//
|
||||
@@ -63,4 +63,11 @@ public final class MusicInstrument implements Keyed {
|
||||
public static final MusicInstrument PONDER = getInstrument("ponder_goat_horn");
|
||||
public static final MusicInstrument SING = getInstrument("sing_goat_horn");
|
||||
@@ -52,4 +52,11 @@ public abstract class MusicInstrument implements Keyed {
|
||||
|
||||
return new MusicInstrument(NamespacedKey.minecraft(name));
|
||||
return instrument;
|
||||
}
|
||||
+
|
||||
+ // Paper start - translation key
|
||||
+ @Override
|
||||
+ public @NotNull String translationKey() {
|
||||
+ return "instrument.minecraft." + this.key.value();
|
||||
+ return "instrument.minecraft." + this.getKey().value();
|
||||
+ }
|
||||
+ // Paper end - translation key
|
||||
}
|
||||
|
|
|
@ -505,13 +505,14 @@ index 0000000000000000000000000000000000000000..1e7b53f9bc13dcd5a0a4a40004591e4f
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 09e3c2872462da546b891cbc396aaffb77f6aadf..c21aefb63678d78a441436761373e9710c1e543a 100644
|
||||
index 74c81f73649507f21351fc003d00fbeca274d92a..4efda6d0f81ac192890b5003ceebf3d8fd07ea08 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -228,6 +228,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
return GameEvent.getByKey(key);
|
||||
}
|
||||
};
|
||||
@@ -248,6 +248,17 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see GameEvent
|
||||
*/
|
||||
Registry<GameEvent> GAME_EVENT = Objects.requireNonNull(Bukkit.getRegistry(GameEvent.class), "No registry present for GameEvent. This is a bug.");
|
||||
+
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Configured structures.
|
||||
|
@ -521,6 +522,7 @@ index 09e3c2872462da546b891cbc396aaffb77f6aadf..c21aefb63678d78a441436761373e971
|
|||
+ @Deprecated(forRemoval = true)
|
||||
+ Registry<io.papermc.paper.world.structure.ConfiguredStructure> CONFIGURED_STRUCTURE = Bukkit.getRegistry(io.papermc.paper.world.structure.ConfiguredStructure.class);
|
||||
+ // Paper end
|
||||
|
||||
+
|
||||
/**
|
||||
* Get the object by its key.
|
||||
*
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index c21aefb63678d78a441436761373e9710c1e543a..1d96ed754be09b52a518967c870eba05bb3e99ee 100644
|
||||
index 4efda6d0f81ac192890b5003ceebf3d8fd07ea08..44d863510d454f316a5d9b7214b54ca499226d74 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -236,6 +236,26 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -257,6 +257,31 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
Registry<io.papermc.paper.world.structure.ConfiguredStructure> CONFIGURED_STRUCTURE = Bukkit.getRegistry(io.papermc.paper.world.structure.ConfiguredStructure.class);
|
||||
|
@ -31,6 +31,11 @@ index c21aefb63678d78a441436761373e9710c1e543a..1d96ed754be09b52a518967c870eba05
|
|||
+ public Iterator<org.bukkit.potion.PotionEffectType> iterator() {
|
||||
+ return Arrays.stream(org.bukkit.potion.PotionEffectType.values()).iterator();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull Stream<org.bukkit.potion.PotionEffectType> stream() {
|
||||
+ return StreamSupport.stream(this.spliterator(), false);
|
||||
+ }
|
||||
+ };
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@ Subject: [PATCH] SculkCatalyst bloom API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/SculkCatalyst.java b/src/main/java/org/bukkit/block/SculkCatalyst.java
|
||||
index ed94fbc0dd590e354b072d0c97fb60d0d5b5fa5c..3b3d73497bd90498294b44319ae7d96234d61aec 100644
|
||||
index 46260df8938bb616dd0e26829a123a24736b0a70..7d53b24003d49c5d7623598e92a6b0603c5d3069 100644
|
||||
--- a/src/main/java/org/bukkit/block/SculkCatalyst.java
|
||||
+++ b/src/main/java/org/bukkit/block/SculkCatalyst.java
|
||||
@@ -4,4 +4,14 @@ package org.bukkit.block;
|
||||
* Represents a captured state of a sculk catalyst.
|
||||
*/
|
||||
public interface SculkCatalyst extends TileState {
|
||||
@@ -24,4 +24,14 @@ public interface SculkCatalyst extends TileState {
|
||||
* @param charges how much charge to spawn.
|
||||
*/
|
||||
void bloom(@NotNull Block block, int charges);
|
||||
+
|
||||
+ // Paper start - SculkCatalyst bloom API
|
||||
+ /**
|
||||
|
@ -21,5 +21,5 @@ index ed94fbc0dd590e354b072d0c97fb60d0d5b5fa5c..3b3d73497bd90498294b44319ae7d962
|
|||
+ * @param charge charge to bloom with, normally the amount of experience dropped from the dead entity
|
||||
+ */
|
||||
+ void bloom(@org.jetbrains.annotations.NotNull io.papermc.paper.math.Position position, int charge);
|
||||
+ // Paper end
|
||||
+ // Paper end - SculkCatalyst bloom API
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ index 3df8c60ab5cd1454660980883f80668d535b742b..37c3a00659ce21623be07317f4f6a45b
|
|||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..f7d5f785f659aa905000d974f573e43f841e7fc0
|
||||
index 0000000000000000000000000000000000000000..3ec94658ddd0c2f7b3716742c247656d9c7c8866
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,138 @@
|
||||
|
@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..f7d5f785f659aa905000d974f573e43f
|
|||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") {
|
||||
+ exclude(group = "org.apache.logging.log4j", module = "log4j-api")
|
||||
+ }
|
||||
+ implementation("org.ow2.asm:asm:9.4")
|
||||
+ implementation("org.ow2.asm:asm:9.5")
|
||||
+ implementation("commons-lang:commons-lang:2.6")
|
||||
+ runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
|
||||
+ runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
|
||||
|
@ -172,7 +172,7 @@ index 0000000000000000000000000000000000000000..f7d5f785f659aa905000d974f573e43f
|
|||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index 241fad1f18c4eaf4283b8179981d1d6e90cd746c..0000000000000000000000000000000000000000
|
||||
index d3780030286a6d53f026e99ee7626a40e02eff8d..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,587 +0,0 @@
|
||||
|
@ -239,7 +239,7 @@ index 241fad1f18c4eaf4283b8179981d1d6e90cd746c..00000000000000000000000000000000
|
|||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm</artifactId>
|
||||
- <version>9.4</version>
|
||||
- <version>9.5</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- Mojang depends -->
|
||||
|
|
|
@ -9,7 +9,7 @@ public net.minecraft.server.packs.VanillaPackResourcesBuilder safeGetPath(Ljava/
|
|||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index f7d5f785f659aa905000d974f573e43f841e7fc0..2fbc68a73575110ded95ca12fa17ab8bb44aae8f 100644
|
||||
index 3ec94658ddd0c2f7b3716742c247656d9c7c8866..b1c84b847f8845407eafc89d8b027b34cc6a95b8 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -9,10 +9,9 @@ plugins {
|
||||
|
@ -20,8 +20,8 @@ index f7d5f785f659aa905000d974f573e43f841e7fc0..2fbc68a73575110ded95ca12fa17ab8b
|
|||
- exclude(group = "org.apache.logging.log4j", module = "log4j-api")
|
||||
- }
|
||||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
|
||||
implementation("org.ow2.asm:asm:9.5")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.5") // Paper - ASM event executor generation
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
|
||||
|
@ -146,7 +146,7 @@ index 03bf7dfc289c6a02f19678d3c7041c027154b99d..43ce85977472fd831fa272ff1d81df45
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 23e88fde465853629c4371d1e1a44d1af493ca3e..5a39201392fefe8da495244fdbc380e882ec938f 100644
|
||||
index e325cb56f2bafce21ce06bb5c674837abbb676e7..8a30ebbac91a0750c00ebbcb5372e6d2a45c064a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -209,7 +209,7 @@ public class Main {
|
||||
|
|
|
@ -5,13 +5,13 @@ Subject: [PATCH] Test changes
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 592d2cd1114ee9fbf7b16068ef729f7db4de83d1..f3f20b34a3ebcbb75004003892e903ee4fd0edd3 100644
|
||||
index b1c84b847f8845407eafc89d8b027b34cc6a95b8..784a2ae459d4a6afd6773d2298838c07c9152250 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -12,6 +12,7 @@ dependencies {
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
|
||||
implementation("org.ow2.asm:asm:9.5")
|
||||
implementation("org.ow2.asm:asm-commons:9.5") // Paper - ASM event executor generation
|
||||
+ testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
|
||||
|
@ -91,14 +91,16 @@ index 0000000000000000000000000000000000000000..e944e9dca13883c57e93e480ae5adfe5
|
|||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/testing/LazyRegistry.java b/src/test/java/io/papermc/paper/testing/LazyRegistry.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..8dd0df8c2cc25d37a2590a07872682230a9335f2
|
||||
index 0000000000000000000000000000000000000000..c88749e839ee1a9cf8439c4218c8a98afbd9c491
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/testing/LazyRegistry.java
|
||||
@@ -0,0 +1,23 @@
|
||||
@@ -0,0 +1,30 @@
|
||||
+package io.papermc.paper.testing;
|
||||
+
|
||||
+import java.util.Iterator;
|
||||
+import java.util.function.Supplier;
|
||||
+import java.util.stream.Stream;
|
||||
+import java.util.stream.StreamSupport;
|
||||
+import org.bukkit.Keyed;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.Registry;
|
||||
|
@ -117,12 +119,17 @@ index 0000000000000000000000000000000000000000..8dd0df8c2cc25d37a2590a0787268223
|
|||
+ public @Nullable Keyed get(@NotNull final NamespacedKey key) {
|
||||
+ return this.supplier().get().get(key);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull Stream<Keyed> stream() {
|
||||
+ return StreamSupport.stream(this.supplier.get().spliterator(), false);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
index 1b875fc4dc5550ffab21d11e0c2451a2b22250f9..c440dcf3cc2ddb8fd9094fe8495e820ae7797f5c 100644
|
||||
index 4f392c199fc31808d339659156f2e9b229e755e2..453e2189b842a6f6f52186578af1ee2e2fcba2e4 100644
|
||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
@@ -53,6 +53,7 @@ public abstract class AbstractTestingBase {
|
||||
@@ -54,6 +54,7 @@ public abstract class AbstractTestingBase {
|
||||
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
|
||||
layers = WorldLoader.loadAndReplaceLayer(resourceManager, layers, RegistryLayer.WORLDGEN, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
||||
REGISTRY_CUSTOM = layers.compositeAccess().freeze();
|
||||
|
@ -130,14 +137,14 @@ index 1b875fc4dc5550ffab21d11e0c2451a2b22250f9..c440dcf3cc2ddb8fd9094fe8495e820a
|
|||
// Register vanilla pack
|
||||
DATA_PACK = ReloadableServerResources.loadResources(resourceManager, REGISTRY_CUSTOM, FeatureFlags.REGISTRY.allFlags(), Commands.CommandSelection.DEDICATED, 0, MoreExecutors.directExecutor(), MoreExecutors.directExecutor()).join();
|
||||
// Bind tags
|
||||
@@ -60,7 +61,6 @@ public abstract class AbstractTestingBase {
|
||||
@@ -61,7 +62,6 @@ public abstract class AbstractTestingBase {
|
||||
// Biome shortcut
|
||||
BIOMES = REGISTRY_CUSTOM.registryOrThrow(Registries.BIOME);
|
||||
|
||||
- DummyServer.setup();
|
||||
DummyEnchantments.setup();
|
||||
|
||||
ImmutableList.Builder<Material> builder = ImmutableList.builder();
|
||||
CraftRegistry.setMinecraftRegistry(REGISTRY_CUSTOM);
|
||||
diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
deleted file mode 100644
|
||||
index e3197ea88b68de8f893f3fa986507b95b789645d..0000000000000000000000000000000000000000
|
||||
|
|
|
@ -14,12 +14,12 @@ public org.spigotmc.SpigotWorldConfig getString(Ljava/lang/String;Ljava/lang/Str
|
|||
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 75ca9df9f74e41802ba102fa052dd3446f400785..d67bfb162d122f6944aa16219b754d8d6ee40fb8 100644
|
||||
index 784a2ae459d4a6afd6773d2298838c07c9152250..b60a9ab80589eb8a3e9ece76c7eb24cd3d6dbe96 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -13,6 +13,7 @@ dependencies {
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
|
||||
implementation("org.ow2.asm:asm:9.5")
|
||||
implementation("org.ow2.asm:asm-commons:9.5") // Paper - ASM event executor generation
|
||||
testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
|
||||
+ implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
|
@ -4567,7 +4567,7 @@ index 0000000000000000000000000000000000000000..70cc7b45e7355f6c8476a74a070f1266
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 1b2ec70b244cb43bbce218ff1aaa16bb4b640ed9..29269596b94b68f441355202b74c735ebfd44c71 100644
|
||||
index ba96530f00faa1d113a14242eb8192349c7c944f..ac59339d9ed4b0860de7d338e5b7610175e27165 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -142,6 +142,10 @@ public class Main {
|
||||
|
@ -4717,10 +4717,10 @@ index cda55e481ddbcc1de5478125c5db20ebba168e7d..bacd4d875642cd93c3185f788745dd73
|
|||
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9aa71c85b630590b49a922fcc8d4badd01d46db4..3f5d20c65d9980b57f676d56a074c8e34a0e2fc8 100644
|
||||
index 396e847ab81100684f61830011f2e675d5f284a4..34209c5f4465eadb095336d8023739e6f0f2785b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -914,6 +914,7 @@ public final class CraftServer implements Server {
|
||||
@@ -916,6 +916,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
|
@ -4729,7 +4729,7 @@ index 9aa71c85b630590b49a922fcc8d4badd01d46db4..3f5d20c65d9980b57f676d56a074c8e3
|
|||
world.serverLevelData.setDifficulty(config.difficulty);
|
||||
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 5a39201392fefe8da495244fdbc380e882ec938f..e8fb9e3454282ad328e6bc0d078142285d9cfa76 100644
|
||||
index 8a30ebbac91a0750c00ebbcb5372e6d2a45c064a..67d408b79422cf0c4aed6636cfd4ebb9e13e19f9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -141,6 +141,19 @@ public class Main {
|
||||
|
@ -4813,14 +4813,14 @@ index 0000000000000000000000000000000000000000..0396589795da1f83ddf62426236dde9a
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
index c440dcf3cc2ddb8fd9094fe8495e820ae7797f5c..d1fd4cf65c31bc00d0bffa3123fc2223f1498a34 100644
|
||||
index 453e2189b842a6f6f52186578af1ee2e2fcba2e4..52a6f1791c7de062d5d567d7cc9ee68731fd6e67 100644
|
||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
@@ -62,6 +62,7 @@ public abstract class AbstractTestingBase {
|
||||
@@ -63,6 +63,7 @@ public abstract class AbstractTestingBase {
|
||||
BIOMES = REGISTRY_CUSTOM.registryOrThrow(Registries.BIOME);
|
||||
|
||||
DummyEnchantments.setup();
|
||||
+ io.papermc.paper.configuration.GlobalConfigTestingBase.setupGlobalConfigForTest(); // Paper
|
||||
|
||||
ImmutableList.Builder<Material> builder = ImmutableList.builder();
|
||||
for (Material m : Material.values()) {
|
||||
CraftRegistry.setMinecraftRegistry(REGISTRY_CUSTOM);
|
||||
|
||||
|
|
|
@ -68,10 +68,10 @@ index 161ad6ab1443b2ce33a2d7d91d189c855db0453b..15a9736a870055d639d03063c7cf67fd
|
|||
this.registryAccess = registryManager;
|
||||
this.structureTemplateManager = structureTemplateManager;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3f5d20c65d9980b57f676d56a074c8e34a0e2fc8..b7c6c204795592dd5480338043d0da521a916190 100644
|
||||
index 34209c5f4465eadb095336d8023739e6f0f2785b..c9bbe1d3a44cea1860f0ecba9580fe8ee87f6929 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2355,7 +2355,13 @@ public final class CraftServer implements Server {
|
||||
@@ -2357,7 +2357,13 @@ public final class CraftServer implements Server {
|
||||
Preconditions.checkArgument(key != null, "NamespacedKey key cannot be null");
|
||||
|
||||
LootDataManager registry = this.getServer().getLootData();
|
||||
|
|
|
@ -2373,7 +2373,7 @@ index d06430d59259849715e1457a75fd4f52406a34c2..a0856fc649c50309258f015e623502dd
|
|||
// CraftBukkit end
|
||||
this.chatVisibility = packet.chatVisibility();
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a1a499f8b2a5a12e60b40d716dd539bc438d0128..8205b7cdc235ae7ebd4db6fe9383f5eeb0132438 100644
|
||||
index 031babd244247612009752b8d47e7c253c15a97d..2bcea1af243cc34f98ff3226067f8c16a9ca4010 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -187,6 +187,8 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
@ -2864,10 +2864,10 @@ index 614e567eb1ef10ac7514909a8425e29ac3627d3d..60596c4ac2ebb8caf19d65591624275b
|
|||
}
|
||||
collection = icons;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b7c6c204795592dd5480338043d0da521a916190..fef313265a5e3f2aea5ed8f767782f4157ec7435 100644
|
||||
index c9bbe1d3a44cea1860f0ecba9580fe8ee87f6929..7b2fdc799b0fe776606d3890098eba58c0bdea83 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -612,8 +612,10 @@ public final class CraftServer implements Server {
|
||||
@@ -614,8 +614,10 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2878,7 +2878,7 @@ index b7c6c204795592dd5480338043d0da521a916190..fef313265a5e3f2aea5ed8f767782f41
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -1469,7 +1471,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1471,7 +1473,15 @@ public final class CraftServer implements Server {
|
||||
return this.configuration.getInt("settings.spawn-radius", -1);
|
||||
}
|
||||
|
||||
|
@ -2894,7 +2894,7 @@ index b7c6c204795592dd5480338043d0da521a916190..fef313265a5e3f2aea5ed8f767782f41
|
|||
public String getShutdownMessage() {
|
||||
return this.configuration.getString("settings.shutdown-message");
|
||||
}
|
||||
@@ -1637,7 +1647,20 @@ public final class CraftServer implements Server {
|
||||
@@ -1639,7 +1649,20 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2915,7 +2915,7 @@ index b7c6c204795592dd5480338043d0da521a916190..fef313265a5e3f2aea5ed8f767782f41
|
|||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
||||
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
|
||||
@@ -1645,14 +1668,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1647,14 +1670,14 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2932,7 +2932,7 @@ index b7c6c204795592dd5480338043d0da521a916190..fef313265a5e3f2aea5ed8f767782f41
|
|||
|
||||
for (CommandSender recipient : recipients) {
|
||||
recipient.sendMessage(message);
|
||||
@@ -1915,6 +1938,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1917,6 +1940,14 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
|
||||
}
|
||||
|
||||
|
@ -2947,7 +2947,7 @@ index b7c6c204795592dd5480338043d0da521a916190..fef313265a5e3f2aea5ed8f767782f41
|
|||
@Override
|
||||
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
|
||||
Preconditions.checkArgument(type != null, "InventoryType cannot be null");
|
||||
@@ -1929,13 +1960,28 @@ public final class CraftServer implements Server {
|
||||
@@ -1931,13 +1962,28 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
||||
}
|
||||
|
||||
|
@ -2976,7 +2976,7 @@ index b7c6c204795592dd5480338043d0da521a916190..fef313265a5e3f2aea5ed8f767782f41
|
|||
public Merchant createMerchant(String title) {
|
||||
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
|
||||
}
|
||||
@@ -2000,6 +2046,17 @@ public final class CraftServer implements Server {
|
||||
@@ -2002,6 +2048,17 @@ public final class CraftServer implements Server {
|
||||
return Thread.currentThread().equals(console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
|
||||
}
|
||||
|
||||
|
@ -2994,7 +2994,7 @@ index b7c6c204795592dd5480338043d0da521a916190..fef313265a5e3f2aea5ed8f767782f41
|
|||
@Override
|
||||
public String getMotd() {
|
||||
return this.console.getMotd();
|
||||
@@ -2434,4 +2491,53 @@ public final class CraftServer implements Server {
|
||||
@@ -2436,4 +2493,53 @@ public final class CraftServer implements Server {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
|
@ -3120,7 +3120,7 @@ index 153143b06fc088f3142a8fa17f153d8a344169d8..d01388bbadf3069357cf52463f4104a1
|
|||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index e8fb9e3454282ad328e6bc0d078142285d9cfa76..ab22205c758768cd0c8a4fc6bca3d7de2e823078 100644
|
||||
index 67d408b79422cf0c4aed6636cfd4ebb9e13e19f9..442beb8675d6d53a92fb6a5b7c2abdda2822e6fe 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -20,6 +20,12 @@ public class Main {
|
||||
|
|
|
@ -605,7 +605,7 @@ index 0000000000000000000000000000000000000000..ae60bd96b5284d54676d8e7e4dd5d170
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 2ac30ef2dd72582f2b7f6a05b1f94b12b44fafc9..a01d423f44b3e547b4fa4d6654f9df636d69525f 100644
|
||||
index 546ad678af2705e3956f5f139aa847354a6fdeae..8bce21e0d3e4ca18dcd43f9ab61387a012a5f24f 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -186,6 +186,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
@ -617,10 +617,10 @@ index 2ac30ef2dd72582f2b7f6a05b1f94b12b44fafc9..a01d423f44b3e547b4fa4d6654f9df63
|
|||
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index fef313265a5e3f2aea5ed8f767782f4157ec7435..06cfbdfaa849cac2decf8900bb0dc28a11f3fead 100644
|
||||
index 7b2fdc799b0fe776606d3890098eba58c0bdea83..c373b1929b8bd4ae5ceb899c6c5ea097a6236f8d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -938,6 +938,7 @@ public final class CraftServer implements Server {
|
||||
@@ -940,6 +940,7 @@ public final class CraftServer implements Server {
|
||||
this.commandMap.clearCommands();
|
||||
this.reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
|
@ -628,7 +628,7 @@ index fef313265a5e3f2aea5ed8f767782f4157ec7435..06cfbdfaa849cac2decf8900bb0dc28a
|
|||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2531,6 +2532,34 @@ public final class CraftServer implements Server {
|
||||
@@ -2533,6 +2534,34 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
|
||||
// Paper start
|
||||
|
|
|
@ -6982,7 +6982,7 @@ index 1eabd8b5a99850298838b11ba97e3d220f444378..8ff786c366332588a2df053438f23cc9
|
|||
Bootstrap.wrapStreams();
|
||||
Bootstrap.bootstrapDuration.set(Duration.between(instant, Instant.now()).toMillis());
|
||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||
index 29269596b94b68f441355202b74c735ebfd44c71..af70ccbc3142aa63ef4bfefe27c6328a29d1770e 100644
|
||||
index ac59339d9ed4b0860de7d338e5b7610175e27165..af8afd53b5d3b34be4a5207316ce35abbcdf202d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Main.java
|
||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||
@@ -133,6 +133,7 @@ public class Main {
|
||||
|
@ -6994,7 +6994,7 @@ index 29269596b94b68f441355202b74c735ebfd44c71..af70ccbc3142aa63ef4bfefe27c6328a
|
|||
Bootstrap.validate();
|
||||
Util.startTimerHackThread();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 06cfbdfaa849cac2decf8900bb0dc28a11f3fead..b8cc3cd61472b1b9103316b79a40e7893d333ee4 100644
|
||||
index c373b1929b8bd4ae5ceb899c6c5ea097a6236f8d..061b1dbb92b9ec608ed9f0e2b7d09d498730610d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -272,7 +272,8 @@ public final class CraftServer implements Server {
|
||||
|
@ -7007,7 +7007,7 @@ index 06cfbdfaa849cac2decf8900bb0dc28a11f3fead..b8cc3cd61472b1b9103316b79a40e789
|
|||
private final StructureManager structureManager;
|
||||
protected final DedicatedServer console;
|
||||
protected final DedicatedPlayerList playerList;
|
||||
@@ -422,24 +423,7 @@ public final class CraftServer implements Server {
|
||||
@@ -424,24 +425,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
public void loadPlugins() {
|
||||
|
@ -7033,7 +7033,7 @@ index 06cfbdfaa849cac2decf8900bb0dc28a11f3fead..b8cc3cd61472b1b9103316b79a40e789
|
|||
}
|
||||
|
||||
public void enablePlugins(PluginLoadOrder type) {
|
||||
@@ -528,15 +512,17 @@ public final class CraftServer implements Server {
|
||||
@@ -530,15 +514,17 @@ public final class CraftServer implements Server {
|
||||
private void enablePlugin(Plugin plugin) {
|
||||
try {
|
||||
List<Permission> perms = plugin.getDescription().getPermissions();
|
||||
|
@ -7057,7 +7057,7 @@ index 06cfbdfaa849cac2decf8900bb0dc28a11f3fead..b8cc3cd61472b1b9103316b79a40e789
|
|||
|
||||
this.pluginManager.enablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
@@ -962,6 +948,7 @@ public final class CraftServer implements Server {
|
||||
@@ -964,6 +950,7 @@ public final class CraftServer implements Server {
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
||||
}
|
||||
|
|
|
@ -1275,7 +1275,7 @@ index 7be97441aed66fa3a21d13ad2211b3e0e08120c0..7cb5abfa89f842194325d26c6e95b494
|
|||
this.entityManager.saveAll();
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8205b7cdc235ae7ebd4db6fe9383f5eeb0132438..0c8bf95ae50a089a5d075d965b4df655aaece4e6 100644
|
||||
index 2bcea1af243cc34f98ff3226067f8c16a9ca4010..1fa9b13831638ea2bfd5d3073dc31018083c8b6a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -341,7 +341,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
@ -1637,10 +1637,10 @@ index 0eb09ce5c850d85ffd7229d27cf06b3e0edda11b..cc1d7626a82881c4410d65c6a33dadae
|
|||
};
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b8cc3cd61472b1b9103316b79a40e7893d333ee4..4167b82564c51000e1ea9bffb234145775fc2993 100644
|
||||
index 061b1dbb92b9ec608ed9f0e2b7d09d498730610d..ccf71eba89afd2f86c6f46b6aebfe25c98f735ed 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -372,7 +372,7 @@ public final class CraftServer implements Server {
|
||||
@@ -374,7 +374,7 @@ public final class CraftServer implements Server {
|
||||
this.saveCommandsConfig();
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
@ -1649,7 +1649,7 @@ index b8cc3cd61472b1b9103316b79a40e7893d333ee4..4167b82564c51000e1ea9bffb2341457
|
|||
this.overrideSpawnLimits();
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
@@ -2448,12 +2448,31 @@ public final class CraftServer implements Server {
|
||||
@@ -2450,12 +2450,31 @@ public final class CraftServer implements Server {
|
||||
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
||||
{
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
|||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4167b82564c51000e1ea9bffb234145775fc2993..6e2a6901ce9204b232afa1ff390dfe1a453b20a2 100644
|
||||
index ccf71eba89afd2f86c6f46b6aebfe25c98f735ed..42e74be803ad80b78e0db1c8cdd2dd9e45a40985 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -426,6 +426,35 @@ public final class CraftServer implements Server {
|
||||
@@ -428,6 +428,35 @@ public final class CraftServer implements Server {
|
||||
io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.INSTANCE.enter(io.papermc.paper.plugin.entrypoint.Entrypoint.PLUGIN); // Paper - replace implementation
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ index 4167b82564c51000e1ea9bffb234145775fc2993..6e2a6901ce9204b232afa1ff390dfe1a
|
|||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index ab22205c758768cd0c8a4fc6bca3d7de2e823078..ff955d3a20bf953770cc81f8b89a6d4425a5f813 100644
|
||||
index 442beb8675d6d53a92fb6a5b7c2abdda2822e6fe..6aeb5c145ea26243abda693e81014f73c6abfb56 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -159,6 +159,12 @@ public class Main {
|
||||
|
|
|
@ -20523,7 +20523,7 @@ index e96a0ca47e4701ba187555bd92c968345bc85677..73b96f804079288e9c5fcc11da54e61e
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0c8bf95ae50a089a5d075d965b4df655aaece4e6..713cd247615f91fc0f762e59eae35a376ffce754 100644
|
||||
index 1fa9b13831638ea2bfd5d3073dc31018083c8b6a..2c922afde237ca0e56ee6dc067f2989434d4d08c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -790,6 +790,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
@ -22684,10 +22684,10 @@ index bf4b2f89d3a7133155c6272379c742318b2c1514..33677ec811ceab939c419bf7d31b9958
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6e2a6901ce9204b232afa1ff390dfe1a453b20a2..2d0d6dbcb515de0d81079a1d6b68c9b2bd973893 100644
|
||||
index 42e74be803ad80b78e0db1c8cdd2dd9e45a40985..3704952279358e0a047ce1dccf2d3ef259b33ff1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1185,7 +1185,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1187,7 +1187,7 @@ public final class CraftServer implements Server {
|
||||
this.console.addLevel(internal);
|
||||
|
||||
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
|
||||
|
@ -22696,7 +22696,7 @@ index 6e2a6901ce9204b232afa1ff390dfe1a453b20a2..2d0d6dbcb515de0d81079a1d6b68c9b2
|
|||
|
||||
this.pluginManager.callEvent(new WorldLoadEvent(internal.getWorld()));
|
||||
return internal.getWorld();
|
||||
@@ -1229,7 +1229,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1231,7 +1231,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
handle.getChunkSource().close(save);
|
||||
|
@ -22705,7 +22705,7 @@ index 6e2a6901ce9204b232afa1ff390dfe1a453b20a2..2d0d6dbcb515de0d81079a1d6b68c9b2
|
|||
handle.convertable.close();
|
||||
} catch (Exception ex) {
|
||||
this.getLogger().log(Level.SEVERE, null, ex);
|
||||
@@ -2060,7 +2060,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2062,7 +2062,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean isPrimaryThread() {
|
||||
|
|
|
@ -145,10 +145,10 @@ index 787f32156b02063adf6426b7430da4c4956b759c..be23196f7bf439c54218debb517dd3f3
|
|||
this.startMetricsRecordingTick();
|
||||
this.profiler.push("tick");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d5731088df47fa49e3248dfbcd755de7cd91efbd..9b725fe12c6f81b02ebea7a12a7c1312a27c6cb1 100644
|
||||
index d4cbe1f06be41c5e54a696898c26a5e499e3ff80..66433478fd82f730705fd383b90145d79189a915 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2473,6 +2473,17 @@ public final class CraftServer implements Server {
|
||||
@@ -2475,6 +2475,17 @@ public final class CraftServer implements Server {
|
||||
return CraftMagicNumbers.INSTANCE;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@ index 2c922afde237ca0e56ee6dc067f2989434d4d08c..a4f0cb93a08136888a81f1a8e7ed1d56
|
|||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9b725fe12c6f81b02ebea7a12a7c1312a27c6cb1..0c54f973d8ce70c10b728bed28c3e50adf028aa6 100644
|
||||
index 66433478fd82f730705fd383b90145d79189a915..fd9457a02f36b0230eb2d4fd549419f46d4b8da3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -884,7 +884,7 @@ public final class CraftServer implements Server {
|
||||
@@ -886,7 +886,7 @@ public final class CraftServer implements Server {
|
||||
public boolean dispatchCommand(CommandSender sender, String commandLine) {
|
||||
Preconditions.checkArgument(sender != null, "sender cannot be null");
|
||||
Preconditions.checkArgument(commandLine != null, "commandLine cannot be null");
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0c54f973d8ce70c10b728bed28c3e50adf028aa6..566c4c6745dcd3a6434420e9b892ec295fe39500 100644
|
||||
index fd9457a02f36b0230eb2d4fd549419f46d4b8da3..10ef586cbbeae40dbdf01232c416ba132229daa2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2013,6 +2013,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2015,6 +2015,7 @@ public final class CraftServer implements Server {
|
||||
return this.helpMap;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
|
|||
A config option has been added for those who depend on the previous behavior, but I don't expect that.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 81758ba9193fad39a291c635c41d2cdbef34c1c2..49dada0a2b97552f080cda0b928f284ff02a25a3 100644
|
||||
index c7849bda8cfaa9c6b581f180342687f30da0a639..6a435ae10003b854d387cfc393b9b526cfcbf0a7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -460,6 +460,7 @@ public final class CraftServer implements Server {
|
||||
@@ -462,6 +462,7 @@ public final class CraftServer implements Server {
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
this.helpMap.initializeGeneralTopics();
|
||||
|
@ -27,7 +27,7 @@ index 81758ba9193fad39a291c635c41d2cdbef34c1c2..49dada0a2b97552f080cda0b928f284f
|
|||
}
|
||||
|
||||
Plugin[] plugins = this.pluginManager.getPlugins();
|
||||
@@ -479,7 +480,7 @@ public final class CraftServer implements Server {
|
||||
@@ -481,7 +482,7 @@ public final class CraftServer implements Server {
|
||||
this.commandMap.registerServerAliases();
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
|
|||
https://github.com/PaperMC/Paper/issues/49
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a910b5a6be35236f39fc70aacd84d2047971aac1..39803ac3f17627e9ba3cac91a37ed347462da99a 100644
|
||||
index 6a435ae10003b854d387cfc393b9b526cfcbf0a7..de50d84008851b44fe8999affbb6c2ac8e376cf3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2617,5 +2617,23 @@ public final class CraftServer implements Server {
|
||||
@@ -2619,5 +2619,23 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
return this.adventure$audiences;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
|
|||
This will remove metadata on reload so it does not crash everything if a plugin uses it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 39803ac3f17627e9ba3cac91a37ed347462da99a..f463257f44104c38cfa35971276aa52a697b0414 100644
|
||||
index de50d84008851b44fe8999affbb6c2ac8e376cf3..1f294e7841de880ebe99e02265ba28ce8c932d07 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -951,8 +951,16 @@ public final class CraftServer implements Server {
|
||||
@@ -953,8 +953,16 @@ public final class CraftServer implements Server {
|
||||
world.spigotConfig.init(); // Spigot
|
||||
}
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@ index da98f074ccd5a40c635824112c97fd174c393cb1..6599f874d9f97e9ef4862039ecad7277
|
|||
} else {
|
||||
String[] astring1 = astring;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f463257f44104c38cfa35971276aa52a697b0414..f38b808355a06b0f276bfcdb8afe4c1d482214d4 100644
|
||||
index 1f294e7841de880ebe99e02265ba28ce8c932d07..e5ec086722ea6049186d48926c66701b118332cf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1722,7 +1722,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1724,7 +1724,7 @@ public final class CraftServer implements Server {
|
||||
// Spigot Start
|
||||
GameProfile profile = null;
|
||||
// Only fetch an online UUID in online mode
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
|||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f38b808355a06b0f276bfcdb8afe4c1d482214d4..a683ffa6e0b838b48274a1ea636ff30d169b0bc3 100644
|
||||
index e5ec086722ea6049186d48926c66701b118332cf..4fffa7e619e586aa9af77fa99d0e554ffbe5aefb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2643,5 +2643,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2645,5 +2645,24 @@ public final class CraftServer implements Server {
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a683ffa6e0b838b48274a1ea636ff30d169b0bc3..5c58ba142b14423f699437fe79693ebb606a3219 100644
|
||||
index 4fffa7e619e586aa9af77fa99d0e554ffbe5aefb..499bce91cd6818473cddc85a1657ff3b147b3439 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2662,5 +2662,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2664,5 +2664,10 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ Other changes:
|
|||
Co-Authored-By: Emilia Kond <emilia@rymiel.space>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index d88da6eb9753e8289705cd7c1f87b7b6e15d9606..65134c3604379223df991cf1b96ccc4d8936f4f9 100644
|
||||
index b60a9ab80589eb8a3e9ece76c7eb24cd3d6dbe96..705289d37139e8ec213f972292d4a8efc294f4cf 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -6,9 +6,30 @@ plugins {
|
||||
|
@ -58,8 +58,8 @@ index d88da6eb9753e8289705cd7c1f87b7b6e15d9606..65134c3604379223df991cf1b96ccc4d
|
|||
+ alsoShade(log4jPlugins.output)
|
||||
+ // Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm-commons:9.4") // Paper - ASM event executor generation
|
||||
implementation("org.ow2.asm:asm:9.5")
|
||||
implementation("org.ow2.asm:asm-commons:9.5") // Paper - ASM event executor generation
|
||||
@@ -75,7 +96,7 @@ relocation {
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ index bc96f426d488d2a206b763dccdc4034fe24f269d..82db70c548336ada2af556251b8ae8d1
|
|||
|
||||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5c58ba142b14423f699437fe79693ebb606a3219..22a359e3883765044e349cd4e785a64d00d6044d 100644
|
||||
index 499bce91cd6818473cddc85a1657ff3b147b3439..bae43a8feeae694658abb864e0aa91ecf0dbe611 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -44,7 +44,6 @@ import java.util.logging.Level;
|
||||
|
@ -400,7 +400,7 @@ index 5c58ba142b14423f699437fe79693ebb606a3219..22a359e3883765044e349cd4e785a64d
|
|||
import net.minecraft.advancements.Advancement;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
@@ -1290,9 +1289,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1292,9 +1291,13 @@ public final class CraftServer implements Server {
|
||||
return this.logger;
|
||||
}
|
||||
|
||||
|
@ -415,7 +415,7 @@ index 5c58ba142b14423f699437fe79693ebb606a3219..22a359e3883765044e349cd4e785a64d
|
|||
@Override
|
||||
public PluginCommand getPluginCommand(String name) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 4646911b65129d49b2398c7d86f2d6aa9213fe97..c5a403bc04fcb7a0fbc1dd1fe9ebf374e6a62af3 100644
|
||||
index 6f2135690892f23e80648d4f9237cea34ec19740..960885c891c98859e8ef375d0796c8b53fcf562c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
||||
|
|
|
@ -83,10 +83,10 @@ index 2fdfc17ef3daf9fb5cc32c807292c71e256d5356..e3394864e29357fec036f9e616472aea
|
|||
|
||||
b1 = 0;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 22a359e3883765044e349cd4e785a64d00d6044d..2ffc67b0b8f2e0f1fbc70099541f093887d9945c 100644
|
||||
index bae43a8feeae694658abb864e0aa91ecf0dbe611..0d7ca54d596377bbe82fa241166c94dae7a40f61 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -526,6 +526,7 @@ public final class CraftServer implements Server {
|
||||
@@ -528,6 +528,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
node = clone;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ index 22a359e3883765044e349cd4e785a64d00d6044d..2ffc67b0b8f2e0f1fbc70099541f0938
|
|||
|
||||
dispatcher.getDispatcher().getRoot().addChild(node);
|
||||
} else {
|
||||
@@ -893,7 +894,13 @@ public final class CraftServer implements Server {
|
||||
@@ -895,7 +896,13 @@ public final class CraftServer implements Server {
|
||||
|
||||
// Spigot start
|
||||
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
|
||||
|
|
|
@ -631,7 +631,7 @@ index 4038bb76339d43f18770624bd7fecc79b8d7f2a9..2456edc11b29a92b1648937cd3dd6a9a
|
|||
String s1 = name.toLowerCase(Locale.ROOT);
|
||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2ffc67b0b8f2e0f1fbc70099541f093887d9945c..d61b4894f4f575c1e4b55439afef327a5fa6c35e 100644
|
||||
index 0d7ca54d596377bbe82fa241166c94dae7a40f61..baa2d98530f28b21796c15125ee9dcbbba7bbf77 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -261,6 +261,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
|
@ -652,7 +652,7 @@ index 2ffc67b0b8f2e0f1fbc70099541f093887d9945c..d61b4894f4f575c1e4b55439afef327a
|
|||
CraftItemFactory.instance();
|
||||
}
|
||||
|
||||
@@ -2677,5 +2681,37 @@ public final class CraftServer implements Server {
|
||||
@@ -2679,5 +2683,37 @@ public final class CraftServer implements Server {
|
||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
|
|
@ -91,10 +91,10 @@ index 51edb4f6be04b9c3b0745bc13fe7ce7cc4868e59..a6e6c82be3a6f397c6cefbd843b17c86
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d61b4894f4f575c1e4b55439afef327a5fa6c35e..0b711440fa42c9e8584cd6fd1ba0d0bb540b833f 100644
|
||||
index baa2d98530f28b21796c15125ee9dcbbba7bbf77..95e08874f993c826839184fa894f82d07224cb12 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2127,7 +2127,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2129,7 +2129,7 @@ public final class CraftServer implements Server {
|
||||
offers = this.tabCompleteChat(player, message);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
|
|||
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0b711440fa42c9e8584cd6fd1ba0d0bb540b833f..0666cf00a8904dcc9092200b2610600e0cf37603 100644
|
||||
index 95e08874f993c826839184fa894f82d07224cb12..e19ddd1ab4d15ee041c74bb3767e3a9c41072f34 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1725,6 +1725,25 @@ public final class CraftServer implements Server {
|
||||
@@ -1727,6 +1727,25 @@ public final class CraftServer implements Server {
|
||||
return recipients.size();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,10 @@ index 97df17a1636ac1ba765a8e486cfbb46bfac9ee6c..980088f5af3d44d47b94ecde52cdc5f9
|
|||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0666cf00a8904dcc9092200b2610600e0cf37603..df12f456131ea62de908573b67e1643e0b0e2e02 100644
|
||||
index e19ddd1ab4d15ee041c74bb3767e3a9c41072f34..2e64d43cdc25135fadb759ea503b26104b881968 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -913,6 +913,7 @@ public final class CraftServer implements Server {
|
||||
@@ -915,6 +915,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public void reload() {
|
||||
|
@ -44,7 +44,7 @@ index 0666cf00a8904dcc9092200b2610600e0cf37603..df12f456131ea62de908573b67e1643e
|
|||
this.reloadCount++;
|
||||
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
|
||||
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
|
||||
@@ -1002,6 +1003,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1004,6 +1005,7 @@ public final class CraftServer implements Server {
|
||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
|
||||
|
|
|
@ -18,10 +18,10 @@ index 0dd48e4098191c8b6e29945d62bc473e9f3a1e77..ae51993e0de706cb62c96795ca9de766
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index df12f456131ea62de908573b67e1643e0b0e2e02..867507780b5a94aeaf07daaf924e89a2bee6ecde 100644
|
||||
index 2e64d43cdc25135fadb759ea503b26104b881968..4926f9f5eaf13b339ce2c2385faf9f4afba3d029 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2703,6 +2703,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2705,6 +2705,16 @@ public final class CraftServer implements Server {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 867507780b5a94aeaf07daaf924e89a2bee6ecde..47212f800c4290c9912e9b9189381b148313a29a 100644
|
||||
index 4926f9f5eaf13b339ce2c2385faf9f4afba3d029..535880a9dc3ccbf8d6f1b185a695011a347bdd88 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2744,5 +2744,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2746,5 +2746,10 @@ public final class CraftServer implements Server {
|
||||
profile.getProperties().putAll(((CraftPlayer)player).getHandle().getGameProfile().getProperties());
|
||||
return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile);
|
||||
}
|
||||
|
|
|
@ -1573,10 +1573,10 @@ index b738e1f7debac7d70910d5ac908ca9d4f60640d5..269ebe8e8826a0c89e471cb59b503900
|
|||
|
||||
public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 47212f800c4290c9912e9b9189381b148313a29a..dfa5364fe6ef4ab8edc826e7fde35d35cc000224 100644
|
||||
index 535880a9dc3ccbf8d6f1b185a695011a347bdd88..06e0904b47838c4bed2ae85a8f329e3035543b5e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2273,7 +2273,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2275,7 +2275,7 @@ public final class CraftServer implements Server {
|
||||
public ChunkGenerator.ChunkData createChunkData(World world) {
|
||||
Preconditions.checkArgument(world != null, "World cannot be null");
|
||||
ServerLevel handle = ((CraftWorld) world).getHandle();
|
||||
|
|
|
@ -6,7 +6,7 @@ Subject: [PATCH] Improve java version check
|
|||
Co-Authored-By: MiniDigger <admin@benndorf.dev>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index c79afabed432ca9094967ae0e48b04133dc4c51b..2badebc0d7954c6d343bfd66dd14dc2d2d4661d7 100644
|
||||
index 863a983165aa845abbf7b8f2a3cd0c5057bb47d8..2badebc0d7954c6d343bfd66dd14dc2d2d4661d7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -200,23 +200,27 @@ public class Main {
|
||||
|
@ -20,8 +20,8 @@ index c79afabed432ca9094967ae0e48b04133dc4c51b..2badebc0d7954c6d343bfd66dd14dc2d
|
|||
- System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'.");
|
||||
- return;
|
||||
- }
|
||||
- if (javaVersion > 64.0) {
|
||||
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 20 is supported.");
|
||||
- if (javaVersion > 65.0) {
|
||||
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 21 is supported.");
|
||||
+ boolean isOldVersion = javaVersion < 61.0;
|
||||
+ if (!skip && isOldVersion) {
|
||||
+ System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'. For more info see https://docs.papermc.io/misc/java-install");
|
||||
|
|
|
@ -184,10 +184,10 @@ index 21d7196cdc694a581c8a3232a39e7454c0b30f56..498f06aa1d8b2c20f5bf31d6751f08cf
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index dfa5364fe6ef4ab8edc826e7fde35d35cc000224..0ece716ec813aa9e68f255fd20604f344f95276c 100644
|
||||
index 06e0904b47838c4bed2ae85a8f329e3035543b5e..677ddf5e368a5407e6935973a87eedb19b02dfee 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2528,6 +2528,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2530,6 +2530,16 @@ public final class CraftServer implements Server {
|
||||
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
|
|||
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 0ece716ec813aa9e68f255fd20604f344f95276c..63cd64a6d88d4f14a446477812a87fc52504849e 100644
|
||||
index 677ddf5e368a5407e6935973a87eedb19b02dfee..4d003aa1066a1fd56683be9ebe4095dddcb1ed83 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2759,5 +2759,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2761,5 +2761,10 @@ public final class CraftServer implements Server {
|
||||
public int getCurrentTick() {
|
||||
return net.minecraft.server.MinecraftServer.currentTick;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose game version
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8d104a58a5ebe4e019d398f17286527f2d33dac7..c3855d89f7d9b8c17b53d7ed34734d32f338fbc5 100644
|
||||
index 4d003aa1066a1fd56683be9ebe4095dddcb1ed83..6c50a39f96700352a3cde0aed953b138193605fb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -580,6 +580,13 @@ public final class CraftServer implements Server {
|
||||
@@ -582,6 +582,13 @@ public final class CraftServer implements Server {
|
||||
return this.bukkitVersion;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,10 +74,10 @@ index 0c7f280bae81bbb492d5780a43e5ffda0f58756a..238a7bc87ab49da1f0fa3c733dd512fd
|
|||
this.connection.send(new ClientboundDisconnectPacket(ichatmutablecomponent));
|
||||
this.connection.disconnect(ichatmutablecomponent);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d643d975c5143ab9f82ad6d7c0f5559ed57cb695..e7418c564ee7a96b6ef11fb66f4df12ebbaf72e9 100644
|
||||
index 6c50a39f96700352a3cde0aed953b138193605fb..0b57122e8c684a41b1163c95ee322adbdb81f7c3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1004,6 +1004,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1006,6 +1006,7 @@ public final class CraftServer implements Server {
|
||||
plugin.getDescription().getFullName(),
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 6ba3b89bd18210cec31b181d025fd4d07dce3cc2..3d420e82e64fba5a5237d6f484a7032e43da2e57 100644
|
||||
index f037aff2f85f5ece47198f3957689a589045a95b..d1f2469815cc0dd742777b18421db7d83deac83f 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -46,6 +46,7 @@ dependencies {
|
||||
|
@ -792,10 +792,10 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31
|
|||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e7418c564ee7a96b6ef11fb66f4df12ebbaf72e9..43267d123a209223e0f9123e3c798374d2ecd37a 100644
|
||||
index 0b57122e8c684a41b1163c95ee322adbdb81f7c3..d07c3a06ab9e6f65090b8df999b7edcfc1b32727 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2772,5 +2772,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2774,5 +2774,11 @@ public final class CraftServer implements Server {
|
||||
public boolean isStopping() {
|
||||
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
||||
}
|
||||
|
|
|
@ -22,10 +22,10 @@ index 8b1a92c1a0e9505ebc11de0e6b54b48343ef8e60..ccf238c12c416e2aa7ee83a14bbbb96f
|
|||
// 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 43267d123a209223e0f9123e3c798374d2ecd37a..d4d25495aeb8c56c93ebaac9f3e239fb4d943f55 100644
|
||||
index d07c3a06ab9e6f65090b8df999b7edcfc1b32727..7909cf20ab3cd4948ed13c6eba0cdf503b557a70 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1014,6 +1014,31 @@ public final class CraftServer implements Server {
|
||||
@@ -1016,6 +1016,31 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
|
||||
}
|
||||
|
||||
|
|
|
@ -102,10 +102,10 @@ index 4de14bd6390537730f764137390be4e7861d9894..3ddf29100807d5882e20395466d420fb
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d4d25495aeb8c56c93ebaac9f3e239fb4d943f55..99cda61e71a2bc9f97c890f21ef3690a0fa3343a 100644
|
||||
index 7909cf20ab3cd4948ed13c6eba0cdf503b557a70..e9376086ea756f39a9766aa698ed0eba9401aaaa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -953,8 +953,8 @@ public final class CraftServer implements Server {
|
||||
@@ -955,8 +955,8 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
|
|
|
@ -22,10 +22,10 @@ wants it to collect even faster, they can restore that setting back to 1 instead
|
|||
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 99cda61e71a2bc9f97c890f21ef3690a0fa3343a..cc222f4f17445350840584f6ecf5bfe7bc4e8c05 100644
|
||||
index e9376086ea756f39a9766aa698ed0eba9401aaaa..0e552fdcc48b0f3f68cbf65113b94782863cb092 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -380,7 +380,7 @@ public final class CraftServer implements Server {
|
||||
@@ -382,7 +382,7 @@ public final class CraftServer implements Server {
|
||||
this.overrideSpawnLimits();
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
|
@ -34,7 +34,7 @@ index 99cda61e71a2bc9f97c890f21ef3690a0fa3343a..cc222f4f17445350840584f6ecf5bfe7
|
|||
this.minimumAPI = this.configuration.getString("settings.minimum-api");
|
||||
this.loadIcon();
|
||||
|
||||
@@ -933,7 +933,7 @@ public final class CraftServer implements Server {
|
||||
@@ -935,7 +935,7 @@ public final class CraftServer implements Server {
|
||||
this.console.setMotd(config.motd);
|
||||
this.overrideSpawnLimits();
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
|
|
|
@ -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 cc222f4f17445350840584f6ecf5bfe7bc4e8c05..338143208ff0b6b8a789b1248691c7008af7bdb8 100644
|
||||
index 0e552fdcc48b0f3f68cbf65113b94782863cb092..f7acc0c4e385c48ca651166baf33caa247e582f6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1809,6 +1809,28 @@ public final class CraftServer implements Server {
|
||||
@@ -1811,6 +1811,28 @@ public final class CraftServer implements Server {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] TODO Registry Modification API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
index 8d392d16050e65de081753c1479d0738d3f021a0..8e1a6206eafdf4160aef280710f0912a0664536f 100644
|
||||
index b42f74375cb2167b28ad8209889fc824e94cfad7..582e509dddfdf6e7b8a2d7310caba076c3bd7dc2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
@@ -36,6 +36,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
@@ -62,6 +62,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
if (bukkitClass == TrimPattern.class) {
|
||||
return new CraftRegistry<>(registryHolder.registryOrThrow(Registries.TRIM_PATTERN), CraftTrimPattern::new);
|
||||
}
|
||||
|
|
|
@ -76,10 +76,10 @@ index 4da303d7e15496f04f0e27bfb613176bc2a72b76..3c7920721914588a3e7eaf1faff46f73
|
|||
Map<StructurePlacement, Set<Holder<Structure>>> map = new Object2ObjectArrayMap();
|
||||
Iterator iterator = structures.iterator();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
index 8e1a6206eafdf4160aef280710f0912a0664536f..15abd319ac51a97cdb07da85e815ea93ff45431a 100644
|
||||
index 582e509dddfdf6e7b8a2d7310caba076c3bd7dc2..3d17c2b6fdfe24cf9aed90649264bdb55407c35b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
@@ -37,6 +37,11 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
@@ -63,6 +63,11 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
return new CraftRegistry<>(registryHolder.registryOrThrow(Registries.TRIM_PATTERN), CraftTrimPattern::new);
|
||||
}
|
||||
// TODO registry modification API
|
||||
|
|
|
@ -20,10 +20,10 @@ index b5981001d8ad4d6c79b965be9a446352971b0d29..0624ba7f1f5b352a5730b6b4736b2499
|
|||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 338143208ff0b6b8a789b1248691c7008af7bdb8..8526221f4b8bd3c98bf0f845c857bcdcecb39657 100644
|
||||
index f7acc0c4e385c48ca651166baf33caa247e582f6..16b0ab4e66072e4367212a3977cc075b62716efc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1135,9 +1135,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1137,9 +1137,15 @@ public final class CraftServer implements Server {
|
||||
File folder = new File(this.getWorldContainer(), name);
|
||||
World world = this.getWorld(name);
|
||||
|
||||
|
@ -41,7 +41,7 @@ index 338143208ff0b6b8a789b1248691c7008af7bdb8..8526221f4b8bd3c98bf0f845c857bcdc
|
|||
|
||||
if (folder.exists()) {
|
||||
Preconditions.checkArgument(folder.isDirectory(), "File (%s) exists and isn't a folder", name);
|
||||
@@ -1224,7 +1230,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1226,7 +1232,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 338143208ff0b6b8a789b1248691c7008af7bdb8..8526221f4b8bd3c98bf0f845c857bcdc
|
|||
}
|
||||
|
||||
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
|
||||
@@ -1316,6 +1322,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1318,6 +1324,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 8526221f4b8bd3c98bf0f845c857bcdcecb39657..7673ac22dfa0b354c540d9af0d7bf2349460a0a9 100644
|
||||
index 16b0ab4e66072e4367212a3977cc075b62716efc..dcfb99b289a35b66cd39b88761684e73c50ab2ba 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -301,6 +301,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -103,7 +103,7 @@ index 8526221f4b8bd3c98bf0f845c857bcdcecb39657..7673ac22dfa0b354c540d9af0d7bf234
|
|||
public static Exception excessiveVelEx; // Paper - Velocity warnings
|
||||
|
||||
static {
|
||||
@@ -388,6 +389,7 @@ public final class CraftServer implements Server {
|
||||
@@ -390,6 +391,7 @@ public final class CraftServer implements Server {
|
||||
if (this.configuration.getBoolean("settings.use-map-color-cache")) {
|
||||
MapPalette.setMapColorCache(new CraftMapColorCache(this.logger));
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ index 8526221f4b8bd3c98bf0f845c857bcdcecb39657..7673ac22dfa0b354c540d9af0d7bf234
|
|||
}
|
||||
|
||||
public boolean getCommandBlockOverride(String command) {
|
||||
@@ -2840,5 +2842,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2842,5 +2844,11 @@ public final class CraftServer implements Server {
|
||||
public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
|
||||
return mobGoals;
|
||||
}
|
||||
|
|
|
@ -362,10 +362,10 @@ index 29da08c58200c24fd03003937d30eb41234cabc9..d3d4d10a77af51cff4da201201bac325
|
|||
public synchronized RegionFile getRegionFileIfLoaded(ChunkPos chunkcoordintpair) {
|
||||
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 7673ac22dfa0b354c540d9af0d7bf2349460a0a9..94889f3f697eb8d2c5e660a015cf4640964e98ae 100644
|
||||
index dcfb99b289a35b66cd39b88761684e73c50ab2ba..492642f3fad94a0770c94d2090f51a3bdd57638c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1212,9 +1212,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1214,9 +1214,7 @@ public final class CraftServer implements Server {
|
||||
worlddata.checkName(name);
|
||||
worlddata.setModdedInfo(this.console.getServerModName(), this.console.getModdedStatus().shouldReportAsModified());
|
||||
|
||||
|
@ -376,7 +376,7 @@ index 7673ac22dfa0b354c540d9af0d7bf2349460a0a9..94889f3f697eb8d2c5e660a015cf4640
|
|||
|
||||
long j = BiomeManager.obfuscateSeed(creator.seed());
|
||||
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata));
|
||||
@@ -1225,6 +1223,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1227,6 +1225,13 @@ public final class CraftServer implements Server {
|
||||
biomeProvider = generator.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,10 @@ index 51dc136b9a5006382de4b12275a9c2f299d5d1f9..7113fdf06bc526af62d08313f8c47e14
|
|||
|
||||
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor
|
||||
diff --git a/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java b/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java
|
||||
index e9ead1e49f9043430e316c36ade83b70cf850e47..f2d10d58617644a589ecec3e17358c1277795e5d 100644
|
||||
index 0d5ae91a9b43df7b412968ab5faf5498c09169f9..744160405680babbb83c99abcbe2dc89bf312398 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/gameevent/GameEventDispatcher.java
|
||||
@@ -56,7 +56,7 @@ public class GameEventDispatcher {
|
||||
@@ -55,7 +55,7 @@ public class GameEventDispatcher {
|
||||
|
||||
for (int l1 = j; l1 <= i1; ++l1) {
|
||||
for (int i2 = l; i2 <= k1; ++i2) {
|
||||
|
|
|
@ -278,10 +278,10 @@ index e57bb23ec14263b7c9dd721fefbe912963b863d0..7bfc95b2a4fd94bcb0347fd7aff9fe0e
|
|||
// 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 c05d2b6a78f3a479ca37ff705f89ee064d419e73..46e1b306ddb4b5d9fba8ce854d697479c758ea7c 100644
|
||||
index 1ed8ced7f72af6a135718e4a06dd46ce352361a7..7460e45e5a9a9733824161dc9a75bf66370f816b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2179,6 +2179,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2181,6 +2181,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 46e1b306ddb4b5d9fba8ce854d697479c758ea7c..2b6a037e014c2d214e3d55068f53cdd0f312fbb8 100644
|
||||
index 7460e45e5a9a9733824161dc9a75bf66370f816b..2b4167581303c79ead5628745efb7a0fa87cf405 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2359,6 +2359,88 @@ public final class CraftServer implements Server {
|
||||
@@ -2361,6 +2361,88 @@ 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 b54a3dcbd94582158a7119b92b02be5a4e32877c..18269a33f6eb3623fbfa6dd551426515
|
|||
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 2b6a037e014c2d214e3d55068f53cdd0f312fbb8..c3beabe15ef5a5862cf8bcea146b746dd05654be 100644
|
||||
index 2b4167581303c79ead5628745efb7a0fa87cf405..a49a2225e18e069e4c2bf12a15d411a5a63c7313 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1219,7 +1219,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1221,7 +1221,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 c3beabe15ef5a5862cf8bcea146b746dd05654be..1033e997653c844cafe4cdb7985191526f4a86ca 100644
|
||||
index a49a2225e18e069e4c2bf12a15d411a5a63c7313..86364d6f0792a9656d1ecb9537cf1cb2c064bca9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2010,6 +2010,13 @@ public final class CraftServer implements Server {
|
||||
@@ -2012,6 +2012,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 1033e997653c844cafe4cdb7985191526f4a86ca..0de3faf1f29608e7a387b4e4d2332d3321934963 100644
|
||||
index 86364d6f0792a9656d1ecb9537cf1cb2c064bca9..99c1577685351477ec127e9c0758125b886a50e8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2187,6 +2187,8 @@ public final class CraftServer implements Server {
|
||||
@@ -2189,6 +2189,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 0de3faf1f29608e7a387b4e4d2332d3321934963..afd9c8696573876d112906cec2bfd23fef1bd7d2 100644
|
||||
index 99c1577685351477ec127e9c0758125b886a50e8..815c95626a1cc4ed7e9641c37825a98fcfceaf4b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2608,6 +2608,15 @@ public final class CraftServer implements Server {
|
||||
@@ -2610,6 +2610,15 @@ public final class CraftServer implements Server {
|
||||
return (org.bukkit.Tag<T>) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ index 0de3faf1f29608e7a387b4e4d2332d3321934963..afd9c8696573876d112906cec2bfd23f
|
|||
default -> throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
@@ -2640,6 +2649,13 @@ public final class CraftServer implements Server {
|
||||
@@ -2642,6 +2651,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 5b64fe9f8c6d6fecad67a395a38fe6d7c91c5954..980b8055b971376e5999d81accf4db3b
|
|||
|
||||
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 afd9c8696573876d112906cec2bfd23fef1bd7d2..ff9930cb6ec661fc065cae906659b5ff18091d22 100644
|
||||
index 815c95626a1cc4ed7e9641c37825a98fcfceaf4b..a84fc43521dc86d458c7bdc5b91e45953bb76e30 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1248,10 +1248,11 @@ public final class CraftServer implements Server {
|
||||
@@ -1250,10 +1250,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 ff9930cb6ec661fc065cae906659b5ff18091d22..5b95fc597ef27f32222303fe0a7901ff9cfa5acd 100644
|
||||
index a84fc43521dc86d458c7bdc5b91e45953bb76e30..741d486f81121a8ddda71be5c8b8603d23f75799 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -304,6 +304,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -175,7 +175,7 @@ index ff9930cb6ec661fc065cae906659b5ff18091d22..5b95fc597ef27f32222303fe0a7901ff
|
|||
|
||||
static {
|
||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
||||
@@ -331,7 +332,7 @@ public final class CraftServer implements Server {
|
||||
@@ -333,7 +334,7 @@ public final class CraftServer implements Server {
|
||||
Enchantments.SHARPNESS.getClass();
|
||||
org.bukkit.enchantments.Enchantment.stopAcceptingRegistrations();
|
||||
|
||||
|
@ -184,7 +184,7 @@ index ff9930cb6ec661fc065cae906659b5ff18091d22..5b95fc597ef27f32222303fe0a7901ff
|
|||
MobEffects.BLINDNESS.getClass();
|
||||
PotionEffectType.stopAcceptingRegistrations();
|
||||
// Ugly hack :(
|
||||
@@ -2967,5 +2968,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2969,5 +2970,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 5b95fc597ef27f32222303fe0a7901ff9cfa5acd..a6bc9144a975e89a2f8ef18cfe935deef81612fe 100644
|
||||
index 741d486f81121a8ddda71be5c8b8603d23f75799..373a72439e63479715b611ef0bd098abeae9eaed 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1296,7 +1296,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1298,7 +1298,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 a6bc9144a975e89a2f8ef18cfe935deef81612fe..d6cc883ed429a6a156b7bba4bb1c0dafff44f9c5 100644
|
||||
index 373a72439e63479715b611ef0bd098abeae9eaed..3468fb9e062a3ff0c2229cb75da45955a3d8761c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1255,6 +1255,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1257,6 +1257,7 @@ public final class CraftServer implements Server {
|
||||
internal.setSpawnSettings(true, true);
|
||||
// Paper - move up
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add support for Proxy Protocol
|
|||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index a62f151047f90ef1db278192b29b3bd3213d4d46..fb98936bb8a5488db75d676c5bcb4060597fbbf8 100644
|
||||
index 5945324724822da7cb95d4b63da07f1ace34f999..7e0580bbd0a557c7bb269507a99d25db07bf31f1 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -30,6 +30,7 @@ dependencies {
|
||||
|
@ -15,7 +15,7 @@ index a62f151047f90ef1db278192b29b3bd3213d4d46..fb98936bb8a5488db75d676c5bcb4060
|
|||
+ implementation("io.netty:netty-codec-haproxy:4.1.87.Final") // Paper - Add support for proxy protocol
|
||||
// Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm:9.4")
|
||||
implementation("org.ow2.asm:asm:9.5")
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
index 2beddfc0532c3835d50724551e3d46cb0d7d2290..44d99e89226adb6234b9405f25ac9dab9bd84297 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||
|
|
|
@ -45,10 +45,10 @@ index d8747518678596586dccb636d8e9b805260e75a7..42f566c9155b70e04d457eb05934d678
|
|||
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 d6cc883ed429a6a156b7bba4bb1c0dafff44f9c5..5e28c5c8b5c2ef92911822c5dad8ee24a559e393 100644
|
||||
index 3468fb9e062a3ff0c2229cb75da45955a3d8761c..0a980eb63e6116f91322fd8bf94db7c5dae7b79a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -872,6 +872,11 @@ public final class CraftServer implements Server {
|
||||
@@ -874,6 +874,11 @@ public final class CraftServer implements Server {
|
||||
return new ArrayList<World>(this.worlds.values());
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ index d6cc883ed429a6a156b7bba4bb1c0dafff44f9c5..5e28c5c8b5c2ef92911822c5dad8ee24
|
|||
public DedicatedPlayerList getHandle() {
|
||||
return this.playerList;
|
||||
}
|
||||
@@ -1131,6 +1136,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1133,6 +1138,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 d6cc883ed429a6a156b7bba4bb1c0dafff44f9c5..5e28c5c8b5c2ef92911822c5dad8ee24
|
|||
Preconditions.checkArgument(creator != null, "WorldCreator cannot be null");
|
||||
|
||||
String name = creator.name();
|
||||
@@ -1270,6 +1276,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1272,6 +1278,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean unloadWorld(World world, boolean save) {
|
||||
|
|
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add missing important BlockStateListPopulator methods
|
|||
Without these methods it causes exceptions due to these being used by certain feature generators.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
|
||||
index 4bd59614606962a5371fd0da54bde25bf6a01325..216b413ce29c2557d12b80b29072e7fc822de551 100644
|
||||
index 6fbf1eab2ea818a0dd0adde0c9247a2d95aac2e0..311808903b42a03b28bad8c75223f95aeecbdfa6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
|
||||
@@ -128,7 +128,7 @@ public class BlockStateListPopulator extends DummyGeneratorAccess {
|
||||
@@ -129,7 +129,7 @@ public class BlockStateListPopulator extends DummyGeneratorAccess {
|
||||
|
||||
@Override
|
||||
public boolean isFluidAtPosition(BlockPos pos, Predicate<FluidState> state) {
|
||||
|
@ -18,9 +18,9 @@ index 4bd59614606962a5371fd0da54bde25bf6a01325..216b413ce29c2557d12b80b29072e7fc
|
|||
}
|
||||
|
||||
@Override
|
||||
@@ -140,4 +140,38 @@ public class BlockStateListPopulator extends DummyGeneratorAccess {
|
||||
public RegistryAccess registryAccess() {
|
||||
return this.world.registryAccess();
|
||||
@@ -152,4 +152,33 @@ public class BlockStateListPopulator extends DummyGeneratorAccess {
|
||||
public long nextSubTickCount() {
|
||||
return this.world.nextSubTickCount();
|
||||
}
|
||||
+
|
||||
+ // Paper start
|
||||
|
@ -42,11 +42,6 @@ index 4bd59614606962a5371fd0da54bde25bf6a01325..216b413ce29c2557d12b80b29072e7fc
|
|||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public net.minecraft.world.level.storage.LevelData getLevelData() {
|
||||
+ return world.getLevelData();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getRawBrightness(BlockPos pos, int ambientDarkness) {
|
||||
+ return world.getRawBrightness(pos, ambientDarkness);
|
||||
+ }
|
||||
|
|
|
@ -20,10 +20,10 @@ index e05eb08a9c229b371887676da510df948b896a85..ceeedbd88c56c08ec8b047c9ca2f14cc
|
|||
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 5e28c5c8b5c2ef92911822c5dad8ee24a559e393..b460bd8597b402b304b08de1f9d41ab745682126 100644
|
||||
index 0a980eb63e6116f91322fd8bf94db7c5dae7b79a..6c8fc3a00109c3c64f9dc32ecdcc98e1b5d0d622 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 {
|
||||
@@ -1774,7 +1774,7 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
||||
|
|
|
@ -213,10 +213,10 @@ index 3fcd7bfdb8945b276c94a263e9da6b85ce470366..3431b1132e55c53cda7cf47f021f2306
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f5f69968aa80c58b5325d4b6a3d03439149b7375..cd4c2e4c0d9d9003273fe04bbe9a61b3024547dd 100644
|
||||
index 6c8fc3a00109c3c64f9dc32ecdcc98e1b5d0d622..03fcdb0eb145d60b96bf241523ade1f4595abdef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -801,7 +801,7 @@ public final class CraftServer implements Server {
|
||||
@@ -803,7 +803,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public long getConnectionThrottle() {
|
||||
// Spigot Start - Automatically set connection throttle for bungee configurations
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index cd4c2e4c0d9d9003273fe04bbe9a61b3024547dd..144e843191bc955d37ee1524746304fbe0d79149 100644
|
||||
index 03fcdb0eb145d60b96bf241523ade1f4595abdef..1d62b3fa7cfbb891b7a1fda01a22f64a6bc1968e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -355,7 +355,11 @@ public final class CraftServer implements Server {
|
||||
@@ -357,7 +357,11 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
|
||||
this.commandsConfiguration.options().copyDefaults(true);
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] fix MapLike spam for missing key 'selector'
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
|
||||
index 405709bed99bb0ddd3a746f0f7815b59394c1b81..846f0c18c348e30fb5ce73e0efafa30c1b121fec 100644
|
||||
index 1fe9af20ca9b17cf346e28fc2075ce1db00d5dcd..043edba56c3d0021b9cdfafd9588ec6a50f944ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
|
||||
@@ -351,7 +351,7 @@ public interface VibrationSystem {
|
||||
@@ -350,7 +350,7 @@ public interface VibrationSystem {
|
||||
public static Codec<VibrationSystem.Data> CODEC = RecordCodecBuilder.create((instance) -> {
|
||||
return instance.group(VibrationInfo.CODEC.optionalFieldOf("event").forGetter((vibrationsystem_a) -> {
|
||||
return Optional.ofNullable(vibrationsystem_a.currentVibration);
|
||||
|
|
|
@ -39,10 +39,10 @@ index fff7ad7a45f310783ac96b44575ad3db13d537fa..640e9bd618dc8286933318744c2064ed
|
|||
Iterator iterator1 = this.players.iterator();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 86b31f29742d940c43a3bca2d4b1910af2cbe1a8..7286623de9f104554d608bf1d192b8a8d890cb15 100644
|
||||
index 47e36ad27761dd6b2e2ef1b86664fa3b3c84865d..0c773cd155bb4dcec17426c2f5860bf44cdb8e0e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1127,6 +1127,18 @@ public final class CraftServer implements Server {
|
||||
@@ -1129,6 +1129,18 @@ public final class CraftServer implements Server {
|
||||
ReloadCommand.reload(console);
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ index 86b31f29742d940c43a3bca2d4b1910af2cbe1a8..7286623de9f104554d608bf1d192b8a8
|
|||
private void loadIcon() {
|
||||
this.icon = new CraftIconCache(null);
|
||||
try {
|
||||
@@ -1469,6 +1481,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1471,6 +1483,13 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean addRecipe(Recipe recipe) {
|
||||
|
@ -75,7 +75,7 @@ index 86b31f29742d940c43a3bca2d4b1910af2cbe1a8..7286623de9f104554d608bf1d192b8a8
|
|||
CraftRecipe toAdd;
|
||||
if (recipe instanceof CraftRecipe) {
|
||||
toAdd = (CraftRecipe) recipe;
|
||||
@@ -1498,6 +1517,11 @@ public final class CraftServer implements Server {
|
||||
@@ -1500,6 +1519,11 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
toAdd.addToCraftingManager();
|
||||
|
@ -87,7 +87,7 @@ index 86b31f29742d940c43a3bca2d4b1910af2cbe1a8..7286623de9f104554d608bf1d192b8a8
|
|||
return true;
|
||||
}
|
||||
|
||||
@@ -1617,10 +1641,23 @@ public final class CraftServer implements Server {
|
||||
@@ -1619,10 +1643,23 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean removeRecipe(NamespacedKey recipeKey) {
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Use correct seed on api world load
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7286623de9f104554d608bf1d192b8a8d890cb15..b4969e522199dda4f1d0319b2fbba1d3994a647c 100644
|
||||
index 0c773cd155bb4dcec17426c2f5860bf44cdb8e0e..346f22e7e71a8bac6a780437c53893a3de583be0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1308,7 +1308,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1310,7 +1310,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
// Paper - move down
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@ Subject: [PATCH] SculkCatalyst bloom API
|
|||
public net.minecraft.world.level.block.entity.SculkCatalystBlockEntity$CatalystListener bloom(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/util/RandomSource;)V
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSculkCatalyst.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSculkCatalyst.java
|
||||
index dc7d6c443af206f50d2b4ca260d64bb86b67553c..0fbead8742da8a2ff5261b747870487a218ffc32 100644
|
||||
index bd86d6abea6185f9be61f0bc5a6aaa4870b2920a..5229a3757907262c7e00ede12b1c77db4e94acd6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSculkCatalyst.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSculkCatalyst.java
|
||||
@@ -9,4 +9,20 @@ public class CraftSculkCatalyst extends CraftBlockEntityState<SculkCatalystBlock
|
||||
public CraftSculkCatalyst(World world, SculkCatalystBlockEntity tileEntity) {
|
||||
super(world, tileEntity);
|
||||
@@ -23,4 +23,20 @@ public class CraftSculkCatalyst extends CraftBlockEntityState<SculkCatalystBlock
|
||||
getTileEntity().getListener().bloom(world.getHandle(), getPosition(), getHandle(), world.getHandle().getRandom());
|
||||
getTileEntity().getListener().getSculkSpreader().addCursors(new BlockPos(block.getX(), block.getY(), block.getZ()), charge);
|
||||
}
|
||||
+
|
||||
+ // Paper start - SculkCatalyst bloom API
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b4969e522199dda4f1d0319b2fbba1d3994a647c..1150a114e56899758264aa678db4e9ec3e78befc 100644
|
||||
index 346f22e7e71a8bac6a780437c53893a3de583be0..74d06790de674cbd230a0b14ac9a6b614c9f84ef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1850,6 +1850,11 @@ public final class CraftServer implements Server {
|
||||
@@ -1852,6 +1852,11 @@ public final class CraftServer implements Server {
|
||||
|
||||
ServerLevel worldServer = ((CraftWorld) world).getHandle();
|
||||
Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored);
|
||||
|
@ -20,7 +20,7 @@ index b4969e522199dda4f1d0319b2fbba1d3994a647c..1150a114e56899758264aa678db4e9ec
|
|||
BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation);
|
||||
|
||||
// Create map with trackPlayer = true, unlimitedTracking = true
|
||||
@@ -1860,6 +1865,31 @@ public final class CraftServer implements Server {
|
||||
@@ -1862,6 +1867,31 @@ public final class CraftServer implements Server {
|
||||
|
||||
return CraftItemStack.asBukkitCopy(stack);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 6b34da8f0c34fb308c825d3e12abf9cf5bac6ab9
|
||||
Subproject commit 69c7ce23f295a5bf1b1b7128bc1daece4ead768e
|
|
@ -1 +1 @@
|
|||
Subproject commit db4ba289785418d608eeca8dec2013e513adf9ad
|
||||
Subproject commit 78796c9de6c7c5f64c51a627ee36a7b972f57878
|
Loading…
Reference in a new issue