3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 20:10:05 +01:00

Updated Upstream (Bukkit/CraftBukkit)

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:
69fa4695 Add some missing deprecation annotations
f850da2e Update Maven plugins/versions
8d8400db Use regular compiler seeing as ECJ doesn't support Java 21 JRE
c29e1688 Revert "BUILDTOOLS-676: Downgrade Maven compiler version"
07bce714 SPIGOT-7355: More field renames and fixes
6a8ea764 Fix bad merge in penultimate commit
50a7920c Fix imports in previous commit
83640dd1 PR-995: Add required feature to MinecraftExperimental for easy lookups
fc1f96cf BUILDTOOLS-676: Downgrade Maven compiler version

CraftBukkit Changes:
90f1059ba Fix item placement
661afb43c SPIGOT-7633: Clearer error message for missing particle data
807b465b3 SPIGOT-7634: Armadillo updates infrequently
590cf09a8 Fix unit tests always seeing Mojang server as unavailable
7c7ac5eb2 SPIGOT-7636: Fix clearing ItemMeta
4a72905cf SPIGOT-7635: Fix Player#transfer and cookie methods
ebb50e136 Fix incorrect Vault implementation
b33fed8b7 Update Maven plugins/versions
6f00f0608 SPIGOT-7632: Control middle clicking chest does not copy contents
db821f405 Use regular compiler seeing as ECJ doesn't support Java 21 JRE
8a2976737 Revert "BUILDTOOLS-676: Downgrade Maven compiler version"
0297f87bb SPIGOT-7355: More field renames and fixes
2d03bdf6a SPIGOT-7629: Fix loading banner patterns
e77951fac Fix equality of deserialized display names
c66f3e4fd SPIGOT-7631: Fix deserialisation of BlockStateMeta
9c2c7be8d SPIGOT-7630: Fix crash saving unticked leashed entities
8c1e7c841 PR-1384: Disable certain PlayerProfile tests, if Mojang's services or internet are not available
ced93d572 SPIGOT-7626: sendSignChange() has no effect
c77362cae SPIGOT-7625: ItemStack with lore cannot be serialized in 1.20.5
ff2004387 SPIGOT-7620: Fix server crash when hoppers transfer items to double chests
8b4abeb03 BUILDTOOLS-676: Downgrade Maven compiler version
Dieser Commit ist enthalten in:
Nassim Jahnke 2024-04-25 23:21:18 +02:00
Ursprung ed790385ed
Commit 2641c02193
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
247 geänderte Dateien mit 947 neuen und 970 gelöschten Zeilen

Datei anzeigen

@ -27,7 +27,7 @@ index 5dd700a956e915c00b25d91dea8d6f285ddab72b..97e78e27ee0eea2c8b24886eeb19164d
+/.factorypath
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000000000000000000000000000000000000..4756a5aa04f8a8f0a8f9ff2c7aa6776b5a6892a5
index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c46b0b620e
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,91 @@
@ -41,7 +41,7 @@ index 0000000000000000000000000000000000000000..4756a5aa04f8a8f0a8f9ff2c7aa6776b
+ withJavadocJar()
+}
+
+val annotationsVersion = "24.0.1"
+val annotationsVersion = "24.1.0"
+val bungeeCordChatVersion = "1.20-R0.2"
+
+dependencies {
@ -61,7 +61,7 @@ index 0000000000000000000000000000000000000000..4756a5aa04f8a8f0a8f9ff2c7aa6776b
+ testCompileOnly(annotations)
+
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
+ testImplementation("org.hamcrest:hamcrest:2.2")
+ testImplementation("org.mockito:mockito-core:5.11.0")
+ testImplementation("org.ow2.asm:asm-tree:9.7")
@ -124,10 +124,10 @@ index 0000000000000000000000000000000000000000..4756a5aa04f8a8f0a8f9ff2c7aa6776b
+}
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index 35e6845d86cbfed386f666307add6d6f3e67dd1c..0000000000000000000000000000000000000000
index 278ecb12ecdb5e1fdf394a1c990a4d849e53e05e..0000000000000000000000000000000000000000
--- a/pom.xml
+++ /dev/null
@@ -1,276 +0,0 @@
@@ -1,267 +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">
@ -217,14 +217,14 @@ index 35e6845d86cbfed386f666307add6d6f3e67dd1c..00000000000000000000000000000000
- <dependency>
- <groupId>org.jetbrains</groupId>
- <artifactId>annotations-java5</artifactId>
- <version>24.0.1</version>
- <version>24.1.0</version>
- <scope>provided</scope>
- </dependency>
- <!-- testing -->
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter</artifactId>
- <version>5.10.0</version>
- <version>5.10.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
@ -267,23 +267,14 @@ index 35e6845d86cbfed386f666307add6d6f3e67dd1c..00000000000000000000000000000000
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.13.0</version>
- <configuration>
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
- <compilerId>eclipse</compilerId>
- <!-- default changed with version 3.11.0 -->
- <showWarnings>false</showWarnings>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-compiler-eclipse</artifactId>
- <version>2.15.0</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.3.0</version>
- <version>3.4.1</version>
- <configuration>
- <archive>
- <manifest>
@ -298,7 +289,7 @@ index 35e6845d86cbfed386f666307add6d6f3e67dd1c..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>3.5.0</version>
- <version>3.5.3</version>
- <executions>
- <execution>
- <phase>package</phase>
@ -325,10 +316,10 @@ index 35e6845d86cbfed386f666307add6d6f3e67dd1c..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>3.5.0</version>
- <version>3.6.3</version>
- <configuration>
- <links>
- <link>https://guava.dev/releases/31.1-jre/api/docs/</link>
- <link>https://guava.dev/releases/32.1.2-jre/api/docs/</link>
- </links>
- <tags>
- <tag>
@ -342,7 +333,7 @@ index 35e6845d86cbfed386f666307add6d6f3e67dd1c..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>3.1.0</version>
- <version>3.2.5</version>
- </plugin>
- </plugins>
- </build>
@ -358,7 +349,7 @@ index 35e6845d86cbfed386f666307add6d6f3e67dd1c..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.3.0</version>
- <version>3.3.1</version>
- <executions>
- <execution>
- <phase>process-classes</phase>

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes
diff --git a/build.gradle.kts b/build.gradle.kts
index 4756a5aa04f8a8f0a8f9ff2c7aa6776b5a6892a5..a1f46208d1f39de54b73c66c3c4284b6f8c86864 100644
index 6271e2bad0ed937c2c46a8c8fdf186c46b0b620e..a918fd14c95e714e935758d60bccd72755e00b11 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -18,15 +18,26 @@ dependencies {
@ -34,7 +34,7 @@ index 4756a5aa04f8a8f0a8f9ff2c7aa6776b5a6892a5..a1f46208d1f39de54b73c66c3c4284b6
+ // Paper end
+
testImplementation("org.apache.commons:commons-lang3:3.12.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
testImplementation("org.hamcrest:hamcrest:2.2")
@@ -69,8 +80,12 @@ tasks.withType<Javadoc> {
options.links(

Datei anzeigen

@ -12,7 +12,7 @@ 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 a1f46208d1f39de54b73c66c3c4284b6f8c86864..be4d301b305f5cd92d2ff352bfb9c6ff9f82fd9b 100644
index a918fd14c95e714e935758d60bccd72755e00b11..768024b2b4584fd7dd86f068c0e79c89ffc5faa1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -105,6 +105,12 @@ tasks.test {

Datei anzeigen

@ -7,7 +7,7 @@ Currently includes generated key holder classes for types
used in the Registry Modification API
diff --git a/build.gradle.kts b/build.gradle.kts
index be4d301b305f5cd92d2ff352bfb9c6ff9f82fd9b..01e3a5ba74f8d4c4c2eb010b289e2a7785b11bcc 100644
index 768024b2b4584fd7dd86f068c0e79c89ffc5faa1..f11a22ab01e97e51619c96f2d8a78a99297efc59 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,6 +1,7 @@
@ -246,12 +246,13 @@ index 0000000000000000000000000000000000000000..3c3fd73f7742bb8602e2f9164dd4c120
+record TypedKeyImpl<T extends Keyed>(@NotNull Key key, @NotNull RegistryKey<T> registryKey) implements TypedKey<T> {
+}
diff --git a/src/main/java/org/bukkit/MinecraftExperimental.java b/src/main/java/org/bukkit/MinecraftExperimental.java
index 2365a8c620be709b280fb08855752bb0995838fc..b63e24b3c4d2f1a08e39434caa527bb2e0edea22 100644
index b6f4810e387c22c4a70609ea1d605130245689a5..74d5c5e516715e7876b81bfa997d80edbe48476d 100644
--- a/src/main/java/org/bukkit/MinecraftExperimental.java
+++ b/src/main/java/org/bukkit/MinecraftExperimental.java
@@ -24,4 +24,5 @@ import org.jetbrains.annotations.ApiStatus;
})
@ApiStatus.Internal
public @interface MinecraftExperimental {
+ String value() default ""; // Paper
@@ -49,4 +49,6 @@ public @interface MinecraftExperimental {
UPDATE_1_21
}
+
+ String desc() default ""; // Paper
}

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add FastUtil to Bukkit
Doesn't expose to plugins, just allows Paper-API to use it for optimization
diff --git a/build.gradle.kts b/build.gradle.kts
index 01e3a5ba74f8d4c4c2eb010b289e2a7785b11bcc..f605e7e0f812a2297b1cecf3f37b69a8edc6b4a5 100644
index f11a22ab01e97e51619c96f2d8a78a99297efc59..2f266350a787a4cfdfda1b0e760bfb7604cac43c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -23,6 +23,7 @@ dependencies {

Datei anzeigen

@ -8,12 +8,12 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
diff --git a/build.gradle.kts b/build.gradle.kts
index f605e7e0f812a2297b1cecf3f37b69a8edc6b4a5..ec60a4b804d9d077fdb7d88519b7fb8816aeab9f 100644
index 2f266350a787a4cfdfda1b0e760bfb7604cac43c..c23ee26662657baa496d6048b9a8ba39b4998e72 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,12 +11,28 @@ java {
val annotationsVersion = "24.0.1"
val annotationsVersion = "24.1.0"
val bungeeCordChatVersion = "1.20-R0.2"
+val adventureVersion = "4.17.0-SNAPSHOT"
+val apiAndDocs: Configuration by configurations.creating {
@ -1106,7 +1106,7 @@ index b79daa857fc686f00ac06b8851e0ab68d83ae949..45d996878ba8d314a47078589b6da59d
public void setCustomName(@Nullable String name);
}
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index ae7b51341fb66c41b8a7c4604fd273d876e311be..4034fcb9abc39b12f0de47c4b679f2ef82353c89 100644
index 9562fcd522b2e2b24ec57fbf18ddeebba3e50abf..9b61129c3ef83d0bfceba54aba2effa12bc90678 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.Nullable;
@ -1150,7 +1150,7 @@ index ae7b51341fb66c41b8a7c4604fd273d876e311be..4034fcb9abc39b12f0de47c4b679f2ef
}
@Override
@@ -247,4 +247,24 @@ public final class NamespacedKey {
@@ -248,4 +248,24 @@ public final class NamespacedKey {
public static NamespacedKey fromString(@NotNull String key) {
return fromString(key, null);
}
@ -1430,10 +1430,10 @@ index bfa9846d93317d07e55b6d7b971326fa07cae27d..3bf7db7eac81e3cc6f5c6700637d10d1
throw new UnsupportedOperationException("Not supported yet.");
}
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
index bd3861c4c2eabca93065c0a6e24e0d3603d86db2..ddc4c5097214371108dc945371e1d28811352c38 100644
index 72260e6284e3f5ce1813635aa07518c47dbf0899..375172e05a78611deb3003f780867516cb6cd1a4 100644
--- a/src/main/java/org/bukkit/Sound.java
+++ b/src/main/java/org/bukkit/Sound.java
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
* guarantee values will not be removed from this Enum. As such, you should not
* depend on the ordinal values of this class.
*/
@ -1442,7 +1442,7 @@ index bd3861c4c2eabca93065c0a6e24e0d3603d86db2..ddc4c5097214371108dc945371e1d288
AMBIENT_BASALT_DELTAS_ADDITIONS("ambient.basalt_deltas.additions"),
AMBIENT_BASALT_DELTAS_LOOP("ambient.basalt_deltas.loop"),
@@ -1727,4 +1727,11 @@ public enum Sound implements Keyed {
@@ -1725,4 +1725,11 @@ public enum Sound implements Keyed {
public NamespacedKey getKey() {
return key;
}
@ -2182,10 +2182,10 @@ index b7d8dd30360a38dbdc7bbce40c8e6ced7261f833..0817f2395c2b18828565435568ce651f
public void sendRawMessage(@Nullable UUID sender, @NotNull String message);
}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
index f9965740ffa267caa698f854120a5d89727c6d37..dddd0e74962d5713c4bb6219fba48aae5763e9ea 100644
index 18983f405b2f6c4159dba5c99674ae7729905cc4..a82d6f469aca02fb28b1b3ad84dc40415f1f1ade 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -317,6 +317,19 @@ public abstract class Enchantment implements Keyed, Translatable {
@@ -318,6 +318,19 @@ public abstract class Enchantment implements Keyed, Translatable {
* @return True if the enchantment may be applied, otherwise False
*/
public abstract boolean canEnchantItem(@NotNull ItemStack item);
@ -3279,10 +3279,10 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..03b4e0300d228e3f3a9f4f75c96e0cf9
* Gets how much EXP the Player should have at respawn.
* <p>
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index a2e9bedc4d7c56f1ae6bd6ace2dff41537e41829..c3aeb1b622509ecd9e2230ce82e3bf07899fa540 100644
index 45acff6f8b4859b6e111d925ae01d59dd361b8c9..f5bdd6b6df126abfa26ce727c80a5772d2ab1a1b 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -163,6 +163,18 @@ public enum InventoryType {
@@ -164,6 +164,18 @@ public enum InventoryType {
private final String title;
private final boolean isCreatable;
@ -3301,7 +3301,7 @@ index a2e9bedc4d7c56f1ae6bd6ace2dff41537e41829..c3aeb1b622509ecd9e2230ce82e3bf07
private InventoryType(int defaultSize, /*@NotNull*/ String defaultTitle) {
this(defaultSize, defaultTitle, true);
}
@@ -171,6 +183,7 @@ public enum InventoryType {
@@ -172,6 +184,7 @@ public enum InventoryType {
size = defaultSize;
title = defaultTitle;
this.isCreatable = isCreatable;
@ -3309,7 +3309,7 @@ index a2e9bedc4d7c56f1ae6bd6ace2dff41537e41829..c3aeb1b622509ecd9e2230ce82e3bf07
}
public int getDefaultSize() {
@@ -178,6 +191,7 @@ public enum InventoryType {
@@ -179,6 +192,7 @@ public enum InventoryType {
}
@NotNull
@ -4323,7 +4323,7 @@ index 60ebfab9596f26cfd2d75a43f3f88f2dd56575f3..dbaf54018a7dd392378869a5a302a880
+ // Paper end - Adventure
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 88cdce67e6a55712cb56e946f2f09c82ddbc1d15..e76c847e57f3d32757129d56922862a4202c9d07 100644
index cf1733bc76d1e29ad0f533f6e49818f83e8e3358..f2a6f62f0344684668febc0999b81748c6737826 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.Nullable;
@ -4335,7 +4335,7 @@ index 88cdce67e6a55712cb56e946f2f09c82ddbc1d15..e76c847e57f3d32757129d56922862a4
private Material type = Material.AIR;
private int amount = 0;
private MaterialData data = null;
@@ -613,4 +613,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -614,4 +614,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public String getTranslationKey() {
return Bukkit.getUnsafe().getTranslationKey(this);
}
@ -4753,7 +4753,7 @@ index bd512a7840d4686759097ee4cbd8b375c530956b..f2242ddc4085f7e7cdd748d860857822
+ // Paper end - adventure
}
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
index 4ddddc5d91a5febba2fd4dea3a15092f4ec32a6f..f9803c7483f7458fed1f22ddfda6e7ef03cfc688 100644
index 9679cc595b5009990d8441a6344505eef1f5d265..f973f0f3925819765412f6f134e553d7d74f1467 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
@@ -12,7 +12,7 @@ public final class MapCursor {
@ -5028,7 +5028,7 @@ index 78fd35e6115072c6bc2ff5a899ffc2edb8f45801..22b1dc5fd4d453161a5ee520072f8e8f
/**
diff --git a/src/main/java/org/bukkit/scoreboard/Scoreboard.java b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
index 083bb2c92a2c557e10b705b773ced97401586c3c..d5723e977d9a25701a4f387f1b26d2414e0fffb8 100644
index bf52375e9ed9ec172eca1d27c06c379e3fc216bc..e6aeb01e80fb63a4ebd6a7cbda1815e49775246d 100644
--- a/src/main/java/org/bukkit/scoreboard/Scoreboard.java
+++ b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
@@ -26,6 +26,71 @@ public interface Scoreboard {
@ -5103,31 +5103,33 @@ index 083bb2c92a2c557e10b705b773ced97401586c3c..d5723e977d9a25701a4f387f1b26d241
/**
* Registers an Objective on this Scoreboard
*
@@ -37,9 +102,10 @@ public interface Scoreboard {
@@ -37,10 +102,11 @@ public interface Scoreboard {
* characters.
* @throws IllegalArgumentException if an objective by that name already
* exists
- * @deprecated use {@link #registerNewObjective(String, Criteria, String)}
+ * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component)}
*/
@Deprecated
@NotNull
+ @Deprecated // Paper
Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName);
/**
@@ -54,9 +120,10 @@ public interface Scoreboard {
@@ -55,10 +121,11 @@ public interface Scoreboard {
* characters.
* @throws IllegalArgumentException if an objective by that name already
* exists
- * @deprecated use {@link #registerNewObjective(String, Criteria, String, RenderType)}
+ * @deprecated use {@link #registerNewObjective(String, Criteria, net.kyori.adventure.text.Component, RenderType)}
*/
@Deprecated
@NotNull
+ @Deprecated // Paper
Objective registerNewObjective(@NotNull String name, @NotNull String criteria, @NotNull String displayName, @NotNull RenderType renderType);
/**
@@ -70,8 +137,10 @@ public interface Scoreboard {
@@ -72,8 +139,10 @@ public interface Scoreboard {
* characters.
* @throws IllegalArgumentException if an objective by that name already
* exists
@ -5138,7 +5140,7 @@ index 083bb2c92a2c557e10b705b773ced97401586c3c..d5723e977d9a25701a4f387f1b26d241
Objective registerNewObjective(@NotNull String name, @NotNull Criteria criteria, @NotNull String displayName);
/**
@@ -86,8 +155,10 @@ public interface Scoreboard {
@@ -88,8 +157,10 @@ public interface Scoreboard {
* characters.
* @throws IllegalArgumentException if an objective by that name already
* exists

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors.
Uses method handles for private or static methods.
diff --git a/build.gradle.kts b/build.gradle.kts
index ec60a4b804d9d077fdb7d88519b7fb8816aeab9f..d64d927ddbb5fd968902c35496b24ce73fd5d588 100644
index c23ee26662657baa496d6048b9a8ba39b4998e72..759294705e0f53c18ce2825b5f6c715a65f23d90 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -47,6 +47,9 @@ dependencies {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Paper Plugins
diff --git a/build.gradle.kts b/build.gradle.kts
index d64d927ddbb5fd968902c35496b24ce73fd5d588..4c792921c7a93c9f9f1a137127edafad6498d30a 100644
index 759294705e0f53c18ce2825b5f6c715a65f23d90..7627eac76bc0e17413df26fdf49e94605be979e5 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -52,7 +52,7 @@ dependencies {

Datei anzeigen

@ -641,10 +641,10 @@ index be0a2d1f234d8265d98e54e518a994957b1f3ab7..4e3c406ba883aae553e8d69b6b719b87
* than BLOCK_CANBUILD, as this refers to a player, not universe-physics
* rule like cactus on dirt.
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
index 2ff1b1308571d8f8056d3359e8a8ba4a589c3726..e9a6e5be5f33a342f7e5c496f0f1c64b2f302ace 100644
index fc2120e03737f5882d6ae916db93fdcf4939b2ba..f2edd4a9357832e9dec3fb0aafa006335d7b289b 100644
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
+++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
@@ -80,7 +80,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
@@ -81,7 +81,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
/**
* Get a list of available {@link EnchantmentOffer} for the player. You can
* modify the values to change the available offers for the player. An offer
@ -1315,7 +1315,7 @@ index 9adc827bc52eaa767a39c82e9cb0ff5a48e02b14..2dde946443fee1f6e79b882cbcb44854
*
* @param chance of the boots being dropped
diff --git a/src/main/java/org/bukkit/inventory/ItemFlag.java b/src/main/java/org/bukkit/inventory/ItemFlag.java
index 42fcc31147934fd4ed6484b0729e938e7ae2f8e2..4e637420b9a39b822be19367a16da93f236549b3 100644
index 8453bd058d426c1088b04c55d2448d205f0a104b..1b3580d1861af402396121805715e4087b3bc587 100644
--- a/src/main/java/org/bukkit/inventory/ItemFlag.java
+++ b/src/main/java/org/bukkit/inventory/ItemFlag.java
@@ -35,7 +35,7 @@ public enum ItemFlag {

Datei anzeigen

@ -33,10 +33,10 @@ index dbaf54018a7dd392378869a5a302a880c7a56338..213e3f3de731d85f788a4bfa8d912e1b
+ // Paper end - add getI18NDisplayName
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index e76c847e57f3d32757129d56922862a4202c9d07..8801a49b1ed6e21d9853f1290e52d6f90ce1211f 100644
index f2a6f62f0344684668febc0999b81748c6737826..d1bce73317fa1dfd35c8b3f94415ba8721c758d6 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -629,5 +629,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -630,5 +630,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public net.kyori.adventure.text.@NotNull Component displayName() {
return Bukkit.getServer().getItemFactory().displayName(this);
}

Datei anzeigen

@ -30,10 +30,10 @@ index 213e3f3de731d85f788a4bfa8d912e1b59c3c045..898c256140cc7fee2c0cc65cca33a0e8
+ // Paper end - ensure server conversions API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 8801a49b1ed6e21d9853f1290e52d6f90ce1211f..e175865e3149861583a38f4271375f7be020b6ff 100644
index d1bce73317fa1dfd35c8b3f94415ba8721c758d6..a71b7f418ca3edb4695b57e5021732c591cfb13f 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -548,7 +548,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -549,7 +549,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
}
}
@ -42,7 +42,7 @@ index 8801a49b1ed6e21d9853f1290e52d6f90ce1211f..e175865e3149861583a38f4271375f7b
}
/**
@@ -630,6 +630,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -631,6 +631,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
return Bukkit.getServer().getItemFactory().displayName(this);
}

Datei anzeigen

@ -14,11 +14,11 @@ it without having to shade it in the plugin and going through
several layers of logging abstraction.
diff --git a/build.gradle.kts b/build.gradle.kts
index 4c792921c7a93c9f9f1a137127edafad6498d30a..3df0639bf4811e29bdef57474b9d9db808d5e62a 100644
index 7627eac76bc0e17413df26fdf49e94605be979e5..44c7abd676d7730837172473244729fa9298ffb1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -12,6 +12,8 @@ java {
val annotationsVersion = "24.0.1"
val annotationsVersion = "24.1.0"
val bungeeCordChatVersion = "1.20-R0.2"
val adventureVersion = "4.17.0-SNAPSHOT"
+val slf4jVersion = "2.0.9"

Datei anzeigen

@ -594,10 +594,10 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919
+ }
+}
diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java
index 698ffe0c76adeb1b00e7e789ce7d164c6adc759d..690cf2aedf558396a71b20ba2b8ce737c61dfe43 100644
index 3d636cb7f275df053d202356c5e9fad5b1112867..b0ccd263cabe911d43cc13261011b64cacaeb7bb 100644
--- a/src/main/java/org/bukkit/Particle.java
+++ b/src/main/java/org/bukkit/Particle.java
@@ -207,6 +207,18 @@ public enum Particle implements Keyed {
@@ -208,6 +208,18 @@ public enum Particle implements Keyed {
return key;
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
Allows you to determine how long it takes to use a usable/consumable item
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index e175865e3149861583a38f4271375f7be020b6ff..9b38ba9bc7e72b60397476683c22d69e468d9353 100644
index a71b7f418ca3edb4695b57e5021732c591cfb13f..7afb1b4fde29d09ad2289956531daded56b02147 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -657,5 +657,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -658,5 +658,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
public String getI18NDisplayName() {
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 9b38ba9bc7e72b60397476683c22d69e468d9353..dbd0d0610f33105ee83ab589c84e73004f684fb5 100644
index 7afb1b4fde29d09ad2289956531daded56b02147..c1e64e09d792da7c7918e401b306f8945a0ff32d 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -3,6 +3,7 @@ package org.bukkit.inventory;
@ -16,7 +16,7 @@ index 9b38ba9bc7e72b60397476683c22d69e468d9353..dbd0d0610f33105ee83ab589c84e7300
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.Material;
@@ -665,5 +666,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -666,5 +667,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
// Requires access to NMS
return ensureServerConversions().getMaxItemUseDuration();
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Material API additions
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index d593dbace48998e5582c2f0c168275e0d59fe1cf..7ce1a0ee5504d4faf548be73be784e87cd4049fe 100644
index fe9c5ccdbaf4a83367f2d1c9c18044665eadf81d..ab4c1d853ed030c6cf2945793e7655509c954f0b 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -122,6 +122,7 @@ import org.jetbrains.annotations.Nullable;
@@ -123,6 +123,7 @@ import org.jetbrains.annotations.Nullable;
/**
* An enum of all material IDs accepted by the official server and client
*/
@ -16,7 +16,7 @@ index d593dbace48998e5582c2f0c168275e0d59fe1cf..7ce1a0ee5504d4faf548be73be784e87
public enum Material implements Keyed, Translatable {
//<editor-fold desc="Materials" defaultstate="collapsed">
AIR(9648, 0),
@@ -4722,6 +4723,22 @@ public enum Material implements Keyed, Translatable {
@@ -4723,6 +4724,22 @@ public enum Material implements Keyed, Translatable {
}
}

Datei anzeigen

@ -300,10 +300,10 @@ index 02b4ffa6b918269bd64f7c518fcceef1f6990737..f0878c7539696cc0676e6010e88914d3
if (this.world == null) {
return null;
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 7ce1a0ee5504d4faf548be73be784e87cd4049fe..76c96e1a82366aafa0148a1260500a38cea12f37 100644
index ab4c1d853ed030c6cf2945793e7655509c954f0b..22459bc96a97734b06985dc3a8ff4358f280f505 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4743,20 +4743,20 @@ public enum Material implements Keyed, Translatable {
@@ -4744,20 +4744,20 @@ public enum Material implements Keyed, Translatable {
* Do not use for any reason.
*
* @return ID of this material
@ -328,7 +328,7 @@ index 7ce1a0ee5504d4faf548be73be784e87cd4049fe..76c96e1a82366aafa0148a1260500a38
public boolean isLegacy() {
return legacy;
}
@@ -4827,8 +4827,10 @@ public enum Material implements Keyed, Translatable {
@@ -4828,8 +4828,10 @@ public enum Material implements Keyed, Translatable {
* Gets the MaterialData class associated with this Material
*
* @return MaterialData associated with this Material
@ -339,7 +339,7 @@ index 7ce1a0ee5504d4faf548be73be784e87cd4049fe..76c96e1a82366aafa0148a1260500a38
public Class<? extends MaterialData> getData() {
Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material");
return ctor.getDeclaringClass();
@@ -9095,7 +9097,11 @@ public enum Material implements Keyed, Translatable {
@@ -9096,7 +9098,11 @@ public enum Material implements Keyed, Translatable {
* material.
*
* @return true if this material can be interacted with.
@ -352,7 +352,7 @@ index 7ce1a0ee5504d4faf548be73be784e87cd4049fe..76c96e1a82366aafa0148a1260500a38
switch (this) {
// <editor-fold defaultstate="collapsed" desc="isInteractable">
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index 4034fcb9abc39b12f0de47c4b679f2ef82353c89..5a2032fde327be45b44fd6aa99808fe7c3054e1b 100644
index 9b61129c3ef83d0bfceba54aba2effa12bc90678..cbdaa121dbc1876d0cd55f4b7b57f283ecaa8f1a 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -74,12 +74,14 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap
@ -730,10 +730,10 @@ index b90f5dc345ad2cdd3ae353dc57f42a14c231d18a..a7b915ded9154d53ac8ca599119c1699
public static PistonMoveReaction getById(int id) {
return byId.get(id);
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
index dddd0e74962d5713c4bb6219fba48aae5763e9ea..a08b285f4dea60a4ba048f58b802573622d2c313 100644
index a82d6f469aca02fb28b1b3ad84dc40415f1f1ade..f4ec7891bdcedc73bff6938e3eddb7ee43d23ec1 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -272,7 +272,7 @@ public abstract class Enchantment implements Keyed, Translatable {
@@ -273,7 +273,7 @@ public abstract class Enchantment implements Keyed, Translatable {
* @deprecated enchantment groupings are now managed by tags, not categories
*/
@NotNull
@ -767,10 +767,10 @@ index 3afe2787de576f7190d87c796bea0ab34dc30248..58191017244f3949f6174fb108e3a245
/**
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
index b975f11d342ca4357362de9aaae3f1af6716049e..c52e386ffa08abbbd38683792b281665cc98bd31 100644
index c308f6a9f36ae8d108d583179464e078e09bf051..dd410ff2cad3dc34ef9d2a37d72417c7b213de63 100644
--- a/src/main/java/org/bukkit/entity/EntityType.java
+++ b/src/main/java/org/bukkit/entity/EntityType.java
@@ -392,9 +392,9 @@ public enum EntityType implements Keyed, Translatable {
@@ -393,9 +393,9 @@ public enum EntityType implements Keyed, Translatable {
*
* @param name the entity type's name
* @return the matching entity type or null
@ -811,10 +811,10 @@ index b27447d7a2833f84cf05946c851f5b6740a578e3..5afeb2f6c82e8f752229462c2d7846f6
// Spigot end
}
diff --git a/src/main/java/org/bukkit/entity/LingeringPotion.java b/src/main/java/org/bukkit/entity/LingeringPotion.java
index f124b35ec76e6cb6a1a0dc464005087043c3efd0..f50aaddf8582be55fd4860ad374d8f2206991897 100644
index bafef53c1d449135f1300c8c8fbb06f482ba67e1..f50aaddf8582be55fd4860ad374d8f2206991897 100644
--- a/src/main/java/org/bukkit/entity/LingeringPotion.java
+++ b/src/main/java/org/bukkit/entity/LingeringPotion.java
@@ -3,6 +3,8 @@ package org.bukkit.entity;
@@ -3,7 +3,8 @@ package org.bukkit.entity;
/**
* Represents a thrown lingering potion bottle
*
@ -822,6 +822,7 @@ index f124b35ec76e6cb6a1a0dc464005087043c3efd0..f50aaddf8582be55fd4860ad374d8f22
+ * @deprecated should not be used for anything, use {@link ThrownPotion} and
+ * set the potion via the methods there.
*/
-@Deprecated
+@Deprecated(forRemoval = true) // Paper
public interface LingeringPotion extends ThrownPotion { }
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
@ -967,7 +968,7 @@ index 53119742beda00a38111063243665bb995ae2188..2d084214e991fecc51f8e18e3d733e43
private static final HandlerList handlers = new HandlerList();
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
index e9a6e5be5f33a342f7e5c496f0f1c64b2f302ace..f0db59a556deaefefbdaca121585c0fd199c13c2 100644
index f2edd4a9357832e9dec3fb0aafa006335d7b289b..378b44c3df1612283c7f993b32fc7b329ec01a9a 100644
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
+++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
@@ -23,7 +23,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
@ -985,9 +986,9 @@ index e9a6e5be5f33a342f7e5c496f0f1c64b2f302ace..f0db59a556deaefefbdaca121585c0fd
*/
+ @Deprecated // Paper
@NotNull
@Deprecated
public int[] getExpLevelCostsOffered() {
int[] levelOffers = new int[offers.length];
@@ -85,8 +86,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
@@ -86,8 +87,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
*
* @return list of available enchantment offers
*/
@ -1419,7 +1420,7 @@ index 898c256140cc7fee2c0cc65cca33a0e86275f115..e34c89a945a0f12cdc4be8cc232c8de9
/**
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index dbd0d0610f33105ee83ab589c84e73004f684fb5..fd3d4dd231d756d51db0155a4c3ad970c4f456ed 100644
index c1e64e09d792da7c7918e401b306f8945a0ff32d..aa8c6a57fb78fcb2e5ecff01f5d2f5871ac4161a 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -8,6 +8,7 @@ import java.util.Map;
@ -1430,15 +1431,7 @@ index dbd0d0610f33105ee83ab589c84e73004f684fb5..fd3d4dd231d756d51db0155a4c3ad970
import org.bukkit.Utility;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.bukkit.enchantments.Enchantment;
@@ -68,6 +69,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
* @param damage durability / damage
* @deprecated see {@link #setDurability(short)}
*/
+ @Deprecated // Paper
public ItemStack(@NotNull final Material type, final int amount, final short damage) {
this(type, amount, damage, null);
}
@@ -169,8 +171,10 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -170,8 +171,10 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
* Gets the MaterialData for this stack of items
*
* @return MaterialData for this item
@ -1449,7 +1442,7 @@ index dbd0d0610f33105ee83ab589c84e73004f684fb5..fd3d4dd231d756d51db0155a4c3ad970
public MaterialData getData() {
Material mat = Bukkit.getUnsafe().toLegacy(getType());
if (data == null && mat != null && mat.getData() != null) {
@@ -184,7 +188,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -185,7 +188,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
* Sets the MaterialData for this stack of items
*
* @param data New MaterialData for this item
@ -1459,7 +1452,7 @@ index dbd0d0610f33105ee83ab589c84e73004f684fb5..fd3d4dd231d756d51db0155a4c3ad970
public void setData(@Nullable MaterialData data) {
if (data == null) {
this.data = data;
@@ -557,7 +563,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -558,7 +563,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
*
* @return a copy of the current ItemStack's ItemData
*/
@ -1664,10 +1657,10 @@ index 32055a8890425e0b819930f3059da5ea9dfca553..26a336dade83baee97d20eb39a058925
/**
diff --git a/src/main/java/org/bukkit/map/MapCanvas.java b/src/main/java/org/bukkit/map/MapCanvas.java
index 00437719722830c087ff925015086c29bbb04497..ae9bcc8262dbf6eb8673ca82395d09169db38f9d 100644
index edef478786bb7456af29ca960009873095830050..e8ac449e6280827beb6d2699df75b1d52a922c9b 100644
--- a/src/main/java/org/bukkit/map/MapCanvas.java
+++ b/src/main/java/org/bukkit/map/MapCanvas.java
@@ -94,9 +94,9 @@ public interface MapCanvas {
@@ -95,9 +95,9 @@ public interface MapCanvas {
* @param x The x coordinate, from 0 to 127.
* @param y The y coordinate, from 0 to 127.
* @return The color. See {@link MapPalette}.
@ -1679,7 +1672,7 @@ index 00437719722830c087ff925015086c29bbb04497..ae9bcc8262dbf6eb8673ca82395d0916
public byte getPixel(int x, int y);
/**
@@ -105,9 +105,9 @@ public interface MapCanvas {
@@ -106,9 +106,9 @@ public interface MapCanvas {
* @param x The x coordinate, from 0 to 127.
* @param y The y coordinate, from 0 to 127.
* @return The color. See {@link MapPalette}.
@ -1692,7 +1685,7 @@ index 00437719722830c087ff925015086c29bbb04497..ae9bcc8262dbf6eb8673ca82395d0916
/**
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
index f9803c7483f7458fed1f22ddfda6e7ef03cfc688..9abea12cb949f7ffa1b72aabf2a3c059b64f3557 100644
index f973f0f3925819765412f6f134e553d7d74f1467..1afa33ca0d900d9301d52ace3ddb0bd50b5ce4e8 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
@@ -158,9 +158,9 @@ public final class MapCursor {
@ -1859,7 +1852,7 @@ index 3e46603f8cd38041394e0e1baf788d9009b3ffc7..b15c141f1db07296bb349f11c6f39b0f
/**
diff --git a/src/main/java/org/bukkit/material/Step.java b/src/main/java/org/bukkit/material/Step.java
index 9f502e7ee05d0512e190a1722cc112ece068c4e2..10c0465cf58d680bfa9a0f9233f94e8b6d5a9b93 100644
index ea94222120ddd4e692b67cf48b029af9ed0e5835..7e49f254032a8a1cf864372a246a49dda6f773c7 100644
--- a/src/main/java/org/bukkit/material/Step.java
+++ b/src/main/java/org/bukkit/material/Step.java
@@ -78,6 +78,7 @@ public class Step extends TexturedMaterial {
@ -1868,8 +1861,8 @@ index 9f502e7ee05d0512e190a1722cc112ece068c4e2..10c0465cf58d680bfa9a0f9233f94e8b
*/
+ @Deprecated // Paper
@Override
@Deprecated
protected int getTextureIndex() {
return getData() & 0x7;
diff --git a/src/main/java/org/bukkit/material/types/MushroomBlockTexture.java b/src/main/java/org/bukkit/material/types/MushroomBlockTexture.java
index 0ea9c6b2420a0f990bd1fdf50fc015e37a7060d8..e99644eae1c662b117aa19060d2484aca19fe0a4 100644
--- a/src/main/java/org/bukkit/material/types/MushroomBlockTexture.java

Datei anzeigen

@ -20,7 +20,7 @@ index d69e5fa40702c283c370a2f712b51dc2ea3a1fa0..30d869a7c4bba79b4c05de7860b31c14
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index fd3d4dd231d756d51db0155a4c3ad970c4f456ed..1f31ff5b85217a1c631f05f43c5a65839a36b26e 100644
index aa8c6a57fb78fcb2e5ecff01f5d2f5871ac4161a..65fc0bca47ea32069ddc6e838a0db28f13638390 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -650,6 +650,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

Datei anzeigen

@ -144,10 +144,10 @@ index dc66bd69646ac949d1386ce8f6ff913e9475439d..4482e8f2c617c2f51b2b53762e775d11
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 76c96e1a82366aafa0148a1260500a38cea12f37..6551bb9409f9714033532b5cfe9219ed84e438f2 100644
index 22459bc96a97734b06985dc3a8ff4358f280f505..afdd4288b0df3e4d89ed4701ea9ec742028fc956 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -123,7 +123,7 @@ import org.jetbrains.annotations.Nullable;
@@ -124,7 +124,7 @@ import org.jetbrains.annotations.Nullable;
* An enum of all material IDs accepted by the official server and client
*/
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
@ -156,7 +156,7 @@ index 76c96e1a82366aafa0148a1260500a38cea12f37..6551bb9409f9714033532b5cfe9219ed
//<editor-fold desc="Materials" defaultstate="collapsed">
AIR(9648, 0),
STONE(22948),
@@ -4737,6 +4737,15 @@ public enum Material implements Keyed, Translatable {
@@ -4738,6 +4738,15 @@ public enum Material implements Keyed, Translatable {
}
return false;
}
@ -172,7 +172,7 @@ index 76c96e1a82366aafa0148a1260500a38cea12f37..6551bb9409f9714033532b5cfe9219ed
// Paper end
/**
@@ -11473,9 +11482,11 @@ public enum Material implements Keyed, Translatable {
@@ -11474,9 +11483,11 @@ public enum Material implements Keyed, Translatable {
* material
* @see #getBlockTranslationKey()
* @see #getItemTranslationKey()
@ -310,10 +310,10 @@ index bf29d9b733afc7c62725d259f4920c4f211cc6d0..1d3812db989a55b6f31bb30dffe70323
// Paper end
}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
index a08b285f4dea60a4ba048f58b802573622d2c313..3375ce0f9ac50cd3f145291ceb587d4e6f72569c 100644
index f4ec7891bdcedc73bff6938e3eddb7ee43d23ec1..4e41980dfbb256356231bc9565f6a90ea66aab76 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.Nullable;
@@ -16,7 +16,7 @@ import org.jetbrains.annotations.Nullable;
/**
* The various type of enchantments that may be added to armour or weapons
*/
@ -338,10 +338,10 @@ index c4f86ba1037f3f0e5d697a0962d71d6f8c7c1fbe..ac0371285370594d4de1554871b19bbc
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
index c52e386ffa08abbbd38683792b281665cc98bd31..4ff2f0b70a89b3d1fb3f588d014e09b3cf8ed16f 100644
index dd410ff2cad3dc34ef9d2a37d72417c7b213de63..b7a454ca11d484209d08d0003d4c19a431456687 100644
--- a/src/main/java/org/bukkit/entity/EntityType.java
+++ b/src/main/java/org/bukkit/entity/EntityType.java
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.Contract;
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@ -350,7 +350,7 @@ index c52e386ffa08abbbd38683792b281665cc98bd31..4ff2f0b70a89b3d1fb3f588d014e09b3
// These strings MUST match the strings in nms.EntityTypes and are case sensitive.
/**
@@ -438,10 +438,22 @@ public enum EntityType implements Keyed, Translatable {
@@ -439,10 +439,22 @@ public enum EntityType implements Keyed, Translatable {
@Override
@NotNull
@ -480,7 +480,7 @@ index 5bd252c0ae3b09fe141d131360c67bb9bfbf5422..78587d9fabe6371a23a7963917b054db
+
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 1f31ff5b85217a1c631f05f43c5a65839a36b26e..1532b3e1b655a9b58588c11b80824ed4cec8c66a 100644
index 65fc0bca47ea32069ddc6e838a0db28f13638390..96b6052c198454f06f877fc7cda85a98c0ddba7c 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Cache the result of Material#isBlock
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 6551bb9409f9714033532b5cfe9219ed84e438f2..852217efbb8dfab445e625a61f8e7f7ba51e5fd6 100644
index afdd4288b0df3e4d89ed4701ea9ec742028fc956..3ee36de0ee975dc300e594b17d0dc2c06edf2a16 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4681,6 +4681,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -4682,6 +4682,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
public final Class<?> data;
private final boolean legacy;
private final NamespacedKey key;
@ -16,7 +16,7 @@ index 6551bb9409f9714033532b5cfe9219ed84e438f2..852217efbb8dfab445e625a61f8e7f7b
private Material(final int id) {
this(id, 64);
@@ -4879,6 +4880,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -4880,6 +4881,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* @return true if this material is a block
*/
public boolean isBlock() {
@ -28,7 +28,7 @@ index 6551bb9409f9714033532b5cfe9219ed84e438f2..852217efbb8dfab445e625a61f8e7f7b
switch (this) {
//<editor-fold defaultstate="collapsed" desc="isBlock">
case ACACIA_BUTTON:
@@ -6123,6 +6129,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -6124,6 +6130,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
static {
for (Material material : values()) {
BY_NAME.put(material.name(), material);

Datei anzeigen

@ -39,10 +39,10 @@ index 0000000000000000000000000000000000000000..74ef8395cc040ce488c2acaa416db202
+ }
+}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 852217efbb8dfab445e625a61f8e7f7ba51e5fd6..b58383b5e3077cbd5df65b8147693aa9543493ef 100644
index 3ee36de0ee975dc300e594b17d0dc2c06edf2a16..7c14a272156cefe6d69e41fec6892891646e0985 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4747,6 +4747,17 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -4748,6 +4748,17 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
return Bukkit.getUnsafe().getBlockTranslationKey(this);
}
}
@ -88,7 +88,7 @@ index 5de86f8cd3cc7f7e8ebc4a22d3921273378704f2..c423204eaf3252c9fc1a3af1214ec70e
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 1532b3e1b655a9b58588c11b80824ed4cec8c66a..569f67ee3f89d6af4fe1420cecc74811550b6507 100644
index 96b6052c198454f06f877fc7cda85a98c0ddba7c..069c644f03286ba62d521754d825e81934e1e6d6 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -888,5 +888,15 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

Datei anzeigen

@ -26,7 +26,7 @@ index 42e4983051062f2fd3b595487cf8093440b41bba..057f4db9cb6b686ab941ec5d3e6ca23d
* Returns the server's protocol version.
*
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 569f67ee3f89d6af4fe1420cecc74811550b6507..78ea59c8f63b5a71ba092cf1783183bb5d0a3b79 100644
index 069c644f03286ba62d521754d825e81934e1e6d6..51f3f387af28bb733e2a20c7befd1070768103b2 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -898,5 +898,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

Datei anzeigen

@ -37,10 +37,10 @@ index 0000000000000000000000000000000000000000..50c49739cc25679c9d241466e3069c9c
+ }
+}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
index 3375ce0f9ac50cd3f145291ceb587d4e6f72569c..5e192105851436dbfe73a6e47c64bbb10e1ac41a 100644
index 4e41980dfbb256356231bc9565f6a90ea66aab76..de616cecaeb45018d96685c916532188e369bdd4 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
@@ -291,11 +291,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
@@ -292,11 +292,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
* Cursed enchantments are found the same way treasure enchantments are
*
* @return true if the enchantment is cursed
@ -52,7 +52,7 @@ index 3375ce0f9ac50cd3f145291ceb587d4e6f72569c..5e192105851436dbfe73a6e47c64bbb1
public abstract boolean isCursed();
/**
@@ -329,6 +325,87 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
@@ -330,6 +326,87 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
* @return the name of the enchantment with {@code level} applied
*/
public abstract net.kyori.adventure.text.@NotNull Component displayName(int level);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack#editMeta
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 78ea59c8f63b5a71ba092cf1783183bb5d0a3b79..12fac9cf93ae7c6b5c8daced10a4394ad29bebcb 100644
index 51f3f387af28bb733e2a20c7befd1070768103b2..0f3ef975293d0e970a35fd6845f8bf911e933169 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -558,6 +558,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Attributes API for item defaults
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index b58383b5e3077cbd5df65b8147693aa9543493ef..d5bdd25f6243d99b6b8c0acd6980db977f75c7e4 100644
index 7c14a272156cefe6d69e41fec6892891646e0985..0dd2a9c7ea5b56995ff238fd0e5eceacf91c9e6f 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4758,6 +4758,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -4759,6 +4759,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
public io.papermc.paper.inventory.ItemRarity getItemRarity() {
return Bukkit.getUnsafe().getItemRarity(this);
}

Datei anzeigen

@ -32,10 +32,10 @@ index db8ffa9b303b9128be175f383fdf838a4e0719e5..b205937d1cd627c1dd660277f69891b5
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
index 4ff2f0b70a89b3d1fb3f588d014e09b3cf8ed16f..3f8ca9c4c51b14818fe1bebf56a032e10f14c758 100644
index b7a454ca11d484209d08d0003d4c19a431456687..1d1315262737d99bf9f5aabc0ae66eee4645cc65 100644
--- a/src/main/java/org/bukkit/entity/EntityType.java
+++ b/src/main/java/org/bukkit/entity/EntityType.java
@@ -452,6 +452,25 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
@@ -453,6 +453,25 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
Preconditions.checkArgument(this != UNKNOWN, "UNKNOWN entities do not have translation keys");
return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add isCollidable methods to various places
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index d5bdd25f6243d99b6b8c0acd6980db977f75c7e4..fab8dfb1bd80490f6891687914997cc8580542cd 100644
index 0dd2a9c7ea5b56995ff238fd0e5eceacf91c9e6f..22e59e24709b1aa1f326d382ebce752c2b42e435 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -4773,6 +4773,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -4774,6 +4774,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
public Multimap<Attribute, AttributeModifier> getItemAttributes(@NotNull EquipmentSlot equipmentSlot) {
return Bukkit.getUnsafe().getItemAttributes(this, equipmentSlot);
}

Datei anzeigen

@ -37,10 +37,10 @@ index a625bcab8e77b05b3341a52c708fae1542b7e3d5..a193ffabb05160b462dee1ba8f687fdb
+ // Paper end - improve scoreboard entries
}
diff --git a/src/main/java/org/bukkit/scoreboard/Scoreboard.java b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
index d5723e977d9a25701a4f387f1b26d2414e0fffb8..30e2b9484cdf4c8efd02e2cda97739e3047958bc 100644
index e6aeb01e80fb63a4ebd6a7cbda1815e49775246d..51bc41ed8ea46a20372065e1e29488dffef796c1 100644
--- a/src/main/java/org/bukkit/scoreboard/Scoreboard.java
+++ b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
@@ -215,9 +215,8 @@ public interface Scoreboard {
@@ -217,9 +217,8 @@ public interface Scoreboard {
* @param player the player whose scores are being retrieved
* @return immutable set of all scores tracked for the player
* @see #getScores(String)
@ -51,7 +51,7 @@ index d5723e977d9a25701a4f387f1b26d2414e0fffb8..30e2b9484cdf4c8efd02e2cda97739e3
@NotNull
Set<Score> getScores(@NotNull OfflinePlayer player);
@@ -235,9 +234,8 @@ public interface Scoreboard {
@@ -237,9 +236,8 @@ public interface Scoreboard {
*
* @param player the player to drop all current scores for
* @see #resetScores(String)
@ -62,7 +62,7 @@ index d5723e977d9a25701a4f387f1b26d2414e0fffb8..30e2b9484cdf4c8efd02e2cda97739e3
void resetScores(@NotNull OfflinePlayer player);
/**
@@ -253,9 +251,8 @@ public interface Scoreboard {
@@ -255,9 +253,8 @@ public interface Scoreboard {
* @param player the player to search for
* @return the player's Team or null if the player is not on a team
* @see #getEntryTeam(String)
@ -73,7 +73,7 @@ index d5723e977d9a25701a4f387f1b26d2414e0fffb8..30e2b9484cdf4c8efd02e2cda97739e3
@Nullable
Team getPlayerTeam(@NotNull OfflinePlayer player);
@@ -320,4 +317,35 @@ public interface Scoreboard {
@@ -322,4 +319,35 @@ public interface Scoreboard {
* @param slot the slot to remove objectives
*/
void clearSlot(@NotNull DisplaySlot slot);

Datei anzeigen

@ -70,7 +70,7 @@ index dbebaf8172ec6872f56958b9583affde4f8400a4..98a970a6582dca22e719a31559c7bece
+ // Paper end - enchantWithLevels API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 12fac9cf93ae7c6b5c8daced10a4394ad29bebcb..f236f9bfa4d43dcbad5919abef3620fcd0696880 100644
index 0f3ef975293d0e970a35fd6845f8bf911e933169..984b6e96a5ebebc38ab62790c4d6a9946c9c6944 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -667,6 +667,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

Datei anzeigen

@ -66,7 +66,7 @@ index 6bfc8a2148f504370df938447f4f6b757f1a516b..208bab1f5a3200f54141c38ee4272629
+ // Paper end - ItemStack damage API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index f236f9bfa4d43dcbad5919abef3620fcd0696880..845037909658884167136955a02b99af0040fa9c 100644
index 984b6e96a5ebebc38ab62790c4d6a9946c9c6944..13648f2e810daa84af25c28a009b1f641791e2f7 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -982,5 +982,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

Datei anzeigen

@ -5,20 +5,10 @@ Subject: [PATCH] Replace ItemFlag.HIDE_POTION_EFFECTS
diff --git a/src/main/java/org/bukkit/inventory/ItemFlag.java b/src/main/java/org/bukkit/inventory/ItemFlag.java
index 4e637420b9a39b822be19367a16da93f236549b3..3df1044fd791ae19576dbfd008cfcbb4e5651b05 100644
index 1b3580d1861af402396121805715e4087b3bc587..7174b843b7deac023637c6c112cf30a567969971 100644
--- a/src/main/java/org/bukkit/inventory/ItemFlag.java
+++ b/src/main/java/org/bukkit/inventory/ItemFlag.java
@@ -28,7 +28,9 @@ public enum ItemFlag {
/**
* Setting to show/hide potion effects, book and firework information, map
* tooltips, patterns of banners, and enchantments of enchanted books.
+ * @deprecated misleading name and description, use {@link #HIDE_ITEM_SPECIFICS}
*/
+ @Deprecated // Paper
HIDE_POTION_EFFECTS,
/**
* Setting to show/hide dyes from colored leather armor.
@@ -38,4 +40,25 @@ public enum ItemFlag {
@@ -38,4 +38,26 @@ public enum ItemFlag {
* Setting to show/hide armor trim from armor.
*/
HIDE_ARMOR_TRIM;
@ -41,6 +31,7 @@ index 4e637420b9a39b822be19367a16da93f236549b3..3df1044fd791ae19576dbfd008cfcbb4
+ * <li>Spawner descriptions</li>
+ * </ul>
+ */
+ public static final ItemFlag HIDE_ITEM_SPECIFICS = HIDE_POTION_EFFECTS;
+ @Deprecated
+ public static final ItemFlag HIDE_ITEM_SPECIFICS = HIDE_ADDITIONAL_TOOLTIP;
+ // Paper end
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Properly remove the experimental smithing inventory type
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index c3aeb1b622509ecd9e2230ce82e3bf07899fa540..64e59fe706b0bb37fc2439fa88fd40c3167c9fb5 100644
index f5bdd6b6df126abfa26ce727c80a5772d2ab1a1b..ccb09660e565bc2f7a653bda95fb38caccf7a060 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -155,7 +155,7 @@ public enum InventoryType {
@@ -156,7 +156,7 @@ public enum InventoryType {
*
* @deprecated use {@link #SMITHING}
*/

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Allow proper checking of empty item stacks
This adds a method to check if an item stack is empty or not. This mirrors vanilla's implementation of the same method.
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 845037909658884167136955a02b99af0040fa9c..c3872213acc75d913580002cf70c2abb4ec69ca0 100644
index 13648f2e810daa84af25c28a009b1f641791e2f7..ff3929b4a497ff0ef0c7ea7f9ac3509764b80e0a 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -996,5 +996,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

Datei anzeigen

@ -9,7 +9,7 @@ By removing this check we avoid unnecessarily allocating useless `ItemMeta` obje
This is a leftover from when checking for the item's durability was "free" because the durability was stored in the `ItemStack` itself, this [was changed in Minecraft 1.13](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/f8b2086d60942eb2cd7ac25a2a1408cb790c222c#src/main/java/org/bukkit/inventory/ItemStack.java).
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index c3872213acc75d913580002cf70c2abb4ec69ca0..7adf54c561d64e6337af8a2d86f6b574b083edb5 100644
index ff3929b4a497ff0ef0c7ea7f9ac3509764b80e0a..ee636c066d1f87873c1ddf52c60c77b1b86d6e90 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -295,7 +295,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

Datei anzeigen

@ -98,10 +98,10 @@ index 76b1d08d9ae2c2cf5c6d88934929695d438b3284..542c0516e19b6177ff8007ca6f8955dc
}
}
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
index 0d250d0c1381aadab031f102f537422a731b88e1..31751aa31ef31142c37ef522a17435f4eeb7231a 100644
index db7723e2907525850f8dbd2bd7150c1e47ebf1c8..1b958b2024ec3f7729605fce70074c5c0208b6cc 100644
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java
@@ -72,6 +72,13 @@ public enum PatternType implements Keyed {
@@ -73,6 +73,13 @@ public enum PatternType implements Keyed {
this.key = NamespacedKey.minecraft(key);
}
@ -116,10 +116,10 @@ index 0d250d0c1381aadab031f102f537422a731b88e1..31751aa31ef31142c37ef522a17435f4
@NotNull
public NamespacedKey getKey() {
diff --git a/src/main/java/org/bukkit/generator/structure/Structure.java b/src/main/java/org/bukkit/generator/structure/Structure.java
index 8e39f282c771ddafe5d890dcf065c56f0c633647..baa3d6d38353ba6d9d0863dd7deaba3c830b2400 100644
index 94092a5882180cca7905388184de1f91633f0df1..46e510e67b156b469d1413e616a5ff6a6487fdbf 100644
--- a/src/main/java/org/bukkit/generator/structure/Structure.java
+++ b/src/main/java/org/bukkit/generator/structure/Structure.java
@@ -63,4 +63,13 @@ public abstract class Structure implements Keyed {
@@ -64,4 +64,13 @@ public abstract class Structure implements Keyed {
*/
@NotNull
public abstract StructureType getStructureType();

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add missing InventoryType
Upstream did not add a DECORATED_POT inventory type
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index 64e59fe706b0bb37fc2439fa88fd40c3167c9fb5..daa1306a7324d946d66ad5a674bbc84371d8d4d6 100644
index ccb09660e565bc2f7a653bda95fb38caccf7a060..59b375569a75cb1e1f7c610f96078e102ec0d3ed 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -144,6 +144,12 @@ public enum InventoryType {
@@ -145,6 +145,12 @@ public enum InventoryType {
* Pseudo jukebox inventory with 1 slot of undefined type.
*/
JUKEBOX(1, "Jukebox", false),

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Return null for empty String in NamespacedKey.fromString
diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java
index 5a2032fde327be45b44fd6aa99808fe7c3054e1b..334a107b991b7edda57f89ada3651ed72f98bffc 100644
index cbdaa121dbc1876d0cd55f4b7b57f283ecaa8f1a..7ff6d60deb129e23b2a4d772aee123eb6c0b6433 100644
--- a/src/main/java/org/bukkit/NamespacedKey.java
+++ b/src/main/java/org/bukkit/NamespacedKey.java
@@ -90,7 +90,7 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap
@ -26,7 +26,7 @@ index 5a2032fde327be45b44fd6aa99808fe7c3054e1b..334a107b991b7edda57f89ada3651ed7
}
@NotNull
@@ -204,7 +204,10 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap
@@ -205,7 +205,10 @@ public final class NamespacedKey implements net.kyori.adventure.key.Key { // Pap
*/
@Nullable
public static NamespacedKey fromString(@NotNull String string, @Nullable Plugin defaultNamespace) {

Datei anzeigen

@ -119,7 +119,7 @@ index 14a49bfd1822c25b95000f3fbb60ba1d55ae0d38..b9a07b2db8a3dcdb72c33c8ceda12992
+ @NotNull java.util.List<net.kyori.adventure.text.Component> computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 7adf54c561d64e6337af8a2d86f6b574b083edb5..245a730a54c4b241a9a67eccceefafd2763bd238 100644
index ee636c066d1f87873c1ddf52c60c77b1b86d6e90..b04e7b9c3f631c0bb7734b809a58dbb988414fbb 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1016,4 +1016,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Deprecate ItemStack#setType
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 245a730a54c4b241a9a67eccceefafd2763bd238..7414b4fa690d393a8e9557cc1fd1ce12fa426940 100644
index b04e7b9c3f631c0bb7734b809a58dbb988414fbb..df2d5ad5ff1bcb1488a94edde9cc4d53cacdd91d 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -134,8 +134,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

Datei anzeigen

@ -28,7 +28,7 @@ index 37dab9e868dbfb019c271a547d975a48ad1cb571..3811c0d849a3eb028ed1a6b7a2d4747f
+/.factorypath
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
index 0000000000000000000000000000000000000000..15bfe45585f0adc868aecb829ffd50c9b7c32cc0
index 0000000000000000000000000000000000000000..e69d74d671b1b73f32eac47d620ec364f419bd6c
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,124 @@
@ -55,7 +55,7 @@ index 0000000000000000000000000000000000000000..15bfe45585f0adc868aecb829ffd50c9
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
+
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
+ testImplementation("org.hamcrest:hamcrest:2.2")
+ testImplementation("org.mockito:mockito-core:5.11.0")
+ testImplementation("org.ow2.asm:asm-tree:9.7")
@ -158,10 +158,10 @@ index 0000000000000000000000000000000000000000..15bfe45585f0adc868aecb829ffd50c9
+}
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
index ca5ed64db9554831442170c57e288941454dcbca..0000000000000000000000000000000000000000
index 37928a37028bb7ee4843d42f256675e000823774..0000000000000000000000000000000000000000
--- a/pom.xml
+++ /dev/null
@@ -1,613 +0,0 @@
@@ -1,604 +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">
- <modelVersion>4.0.0</modelVersion>
@ -435,14 +435,14 @@ index ca5ed64db9554831442170c57e288941454dcbca..00000000000000000000000000000000
- <dependency>
- <groupId>org.jetbrains</groupId>
- <artifactId>annotations-java5</artifactId>
- <version>24.0.1</version>
- <version>24.1.0</version>
- <scope>provided</scope>
- </dependency>
- <!-- testing -->
- <dependency>
- <groupId>org.junit.jupiter</groupId>
- <artifactId>junit-jupiter</artifactId>
- <version>5.10.0</version>
- <version>5.10.2</version>
- <scope>test</scope>
- </dependency>
- <dependency>
@ -515,7 +515,7 @@ index ca5ed64db9554831442170c57e288941454dcbca..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.3.0</version>
- <version>3.4.1</version>
- <configuration>
- <archive>
- <manifest>
@ -557,7 +557,7 @@ index ca5ed64db9554831442170c57e288941454dcbca..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>3.5.0</version>
- <version>3.5.3</version>
- <executions>
- <execution>
- <phase>package</phase>
@ -588,7 +588,7 @@ index ca5ed64db9554831442170c57e288941454dcbca..00000000000000000000000000000000
- <plugin>
- <groupId>net.md-5</groupId>
- <artifactId>specialsource-maven-plugin</artifactId>
- <version>2.0.2</version>
- <version>2.0.3</version>
- <executions>
- <execution>
- <phase>package</phase>
@ -634,7 +634,7 @@ index ca5ed64db9554831442170c57e288941454dcbca..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>3.6.0</version>
- <version>3.7.1</version>
- <executions>
- <execution>
- <phase>package</phase>
@ -663,23 +663,14 @@ index ca5ed64db9554831442170c57e288941454dcbca..00000000000000000000000000000000
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.13.0</version>
- <configuration>
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
- <compilerId>eclipse</compilerId>
- <!-- default changed with version 3.11.0 -->
- <showWarnings>false</showWarnings>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-compiler-eclipse</artifactId>
- <version>2.15.0</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>3.1.0</version>
- <version>3.2.5</version>
- <configuration>
- <workingDirectory>${basedir}/target/test-server</workingDirectory>
- <excludes>
@ -708,7 +699,7 @@ index ca5ed64db9554831442170c57e288941454dcbca..00000000000000000000000000000000
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>3.3.0</version>
- <version>3.3.1</version>
- <executions>
- <execution>
- <phase>test-compile</phase>

Datei anzeigen

@ -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 15bfe45585f0adc868aecb829ffd50c9b7c32cc0..1be20e94b5a81cd5c065ae1491d3c3d3477e79ff 100644
index e69d74d671b1b73f32eac47d620ec364f419bd6c..9d425351f32739eb6c18ebc5c36545c1be21d436 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,9 +9,7 @@ plugins {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Test changes
diff --git a/build.gradle.kts b/build.gradle.kts
index 1be20e94b5a81cd5c065ae1491d3c3d3477e79ff..b853ec25ff3edd2bc6c6d896cc848120b092c077 100644
index 9d425351f32739eb6c18ebc5c36545c1be21d436..db90a1c1409cc7a58f35d2e9ae768f2edd3f36ae 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -23,6 +23,7 @@ dependencies {

Datei anzeigen

@ -15,7 +15,7 @@ public net.minecraft.server.dedicated.DedicatedServerProperties reload(Lnet/mine
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
diff --git a/build.gradle.kts b/build.gradle.kts
index b853ec25ff3edd2bc6c6d896cc848120b092c077..e6d4db67bdee5a0f980a74c38f00d760882bdfeb 100644
index db90a1c1409cc7a58f35d2e9ae768f2edd3f36ae..c0a078302223202db37d2ed9ecf20716ed7706a5 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,6 +11,7 @@ dependencies {

Datei anzeigen

@ -7073,7 +7073,7 @@ index 09a3d06f1c613662283eb6688bf2c3eeb4778208..dcf53dbecc1873994b171cfd1eb31354
@Override
public float getBukkitYaw() {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index ed88e2bbc848b003e2143cd4a372c58c890cfe5c..7d04a18f62411f00dc7be59564ac6c292834c08a 100644
index 113440cd203c1273934b9b7ad7a0fe36f44d0c88..2e83e5779d5bdfc150257d3394669d53eba5c5c3 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -287,6 +287,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
@ -7111,10 +7111,10 @@ index f73604d762efbac400d40f536ec1782fca584efa..4701bf9ee203f2f15b0b68e84bbfa2c4
super(type, world);
this.xpReward = 5;
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 74486f93527536d128e09ce03a99bdec4d99f2d9..2535cbf50087a4631c4d1027a61b173121d729bc 100644
index a5d1cd1966ad85ad0a241bee9caa8fd7b7424017..2b8b220bf1e132b230abe14770da53de84db9818 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -957,6 +957,25 @@ public final class ItemStack implements DataComponentHolder {
@@ -952,6 +952,25 @@ public final class ItemStack implements DataComponentHolder {
}
}
@ -7140,7 +7140,7 @@ index 74486f93527536d128e09ce03a99bdec4d99f2d9..2535cbf50087a4631c4d1027a61b1731
public void applyComponents(DataComponentPatch changes) {
this.components.applyPatch(changes);
this.getItem().verifyComponentsAfterLoad(this);
@@ -1210,6 +1229,7 @@ public final class ItemStack implements DataComponentHolder {
@@ -1205,6 +1224,7 @@ public final class ItemStack implements DataComponentHolder {
// CraftBukkit start
@Deprecated
public void setItem(Item item) {
@ -7765,7 +7765,7 @@ index 080c0cf84d959e1acdde088f367bd005ea9c3bbd..9b299f74336ad0efecd05a4b771ac585
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 62ad3102e20415185b7dfa9effc305a5465252cc..a1b34778332472c09f3191bc72f9eb3df5e54ba4 100644
index fb8243b6202374b5a1b5197a6b7984e1cfb60500..6ce2b09c4bb7153c960a7eed865296a9c93dd1cb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -252,8 +252,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@ -7788,7 +7788,7 @@ index 62ad3102e20415185b7dfa9effc305a5465252cc..a1b34778332472c09f3191bc72f9eb3d
if (playerChunk == null) return false;
playerChunk.getTickingChunkFuture().thenAccept(either -> {
@@ -2079,4 +2079,55 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2075,4 +2075,55 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return this.spigot;
}
// Spigot end
@ -7845,10 +7845,10 @@ index 62ad3102e20415185b7dfa9effc305a5465252cc..a1b34778332472c09f3191bc72f9eb3d
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 02b217544d1237c78b1d754a4575665d7b6fd465..9d2af8b74e33888df33425627b286d32c95753d6 100644
index be0f10f8905cba30e26d61af879b054d3df5284b..13c3ac65f26e6cfc55ee3538b6308ef93f9936aa 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2404,4 +2404,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2400,4 +2400,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.spigot;
}
// Spigot end
@ -7884,7 +7884,7 @@ index 02b217544d1237c78b1d754a4575665d7b6fd465..9d2af8b74e33888df33425627b286d32
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 29286c0fdd9720e0842f945d03010ec61f1daa64..1f99a9b9a0510ab19a5913588d6d677d6cada5e5 100644
index 39803e02ff5fcca8c9ce07aae890ab7095656370..b6521462d193bff83ace1dc694c6d957a7173969 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -22,6 +22,20 @@ import org.bukkit.material.MaterialData;

Datei anzeigen

@ -2714,10 +2714,10 @@ index 5631621f16fdda723cb3e1de7d3a6646d768a863..4277f7c477efe01d4ef917515178b260
this.chatVisibility = clientOptions.chatVisibility();
this.canChatColor = clientOptions.chatColors();
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index 864fbf941d3aecea9e4637199784a0abf7ab4ba9..70a22e140050273ae420e8dc414eab6d08e78617 100644
index 6f17aeae2941c43205fa6db5950d65f510774104..26b8a69a528db8a836b138a2a223c385508ce2c4 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -55,7 +55,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -66,7 +66,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
private static final Component TIMEOUT_DISCONNECTION_MESSAGE = Component.translatable("disconnect.timeout");
static final Component DISCONNECT_UNEXPECTED_QUERY = Component.translatable("multiplayer.disconnect.unexpected_query_response");
protected final MinecraftServer server;
@ -2726,7 +2726,7 @@ index 864fbf941d3aecea9e4637199784a0abf7ab4ba9..70a22e140050273ae420e8dc414eab6d
private final boolean transferred;
private long keepAliveTime;
private boolean keepAlivePending;
@@ -64,6 +64,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -75,6 +75,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
private boolean closed = false;
private int latency;
private volatile boolean suspendFlushingOnServerThread = false;
@ -2734,7 +2734,7 @@ index 864fbf941d3aecea9e4637199784a0abf7ab4ba9..70a22e140050273ae420e8dc414eab6d
public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) { // CraftBukkit
this.server = minecraftserver;
@@ -177,6 +178,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -188,6 +189,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack {} rejection", this.playerProfile().getName(), packet.id());
this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
}
@ -2753,7 +2753,7 @@ index 864fbf941d3aecea9e4637199784a0abf7ab4ba9..70a22e140050273ae420e8dc414eab6d
this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packet.id(), PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()])); // CraftBukkit
}
@@ -265,12 +278,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -276,12 +289,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
// CraftBukkit start
@Deprecated
@ -2775,7 +2775,7 @@ index 864fbf941d3aecea9e4637199784a0abf7ab4ba9..70a22e140050273ae420e8dc414eab6d
// CraftBukkit start - fire PlayerKickEvent
if (this.processedDisconnect) {
return;
@@ -279,7 +298,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -290,7 +309,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
Waitable waitable = new Waitable() {
@Override
protected Object evaluate() {
@ -2784,7 +2784,7 @@ index 864fbf941d3aecea9e4637199784a0abf7ab4ba9..70a22e140050273ae420e8dc414eab6d
return null;
}
};
@@ -296,9 +315,9 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -307,9 +326,9 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
return;
}
@ -2796,7 +2796,7 @@ index 864fbf941d3aecea9e4637199784a0abf7ab4ba9..70a22e140050273ae420e8dc414eab6d
if (this.cserver.getServer().isRunning()) {
this.cserver.getPluginManager().callEvent(event);
@@ -310,7 +329,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -321,7 +340,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
}
this.player.kickLeaveMessage = event.getLeaveMessage(); // CraftBukkit - SPIGOT-3034: Forward leave message to PlayerQuitEvent
// Send the possibly modified leave message
@ -2806,10 +2806,10 @@ index 864fbf941d3aecea9e4637199784a0abf7ab4ba9..70a22e140050273ae420e8dc414eab6d
this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> {
diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
index 5d3825781ee19ae2a746e98ff66f6392c35dd2ce..d13c57d5aa908e4c6ec835c78e6506a98033fb6d 100644
index bd7107279ca004f35c932e5d6e82f8302ec781ae..970d1ddf0a014b47b0ac97440489706137324991 100644
--- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
@@ -106,6 +106,7 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
@@ -100,6 +100,7 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
@Override
public void handleClientInformation(ServerboundClientInformationPacket packet) {
this.clientInformation = packet.information();
@ -2818,18 +2818,18 @@ index 5d3825781ee19ae2a746e98ff66f6392c35dd2ce..d13c57d5aa908e4c6ec835c78e6506a9
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c72c5d0fa96e92539a0e7175a161ed2b8d99d629..ad965076a31b947afc65fdf3a03972f407235e92 100644
index d17358e391060c674d0b83b1619e0de8190c6791..86d0207a36df67bf0554193bf050e035aeecc5c9 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -45,6 +45,7 @@ import net.minecraft.nbt.CompoundTag;
@@ -44,6 +44,7 @@ import net.minecraft.core.registries.Registries;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.Connection;
import net.minecraft.network.ConnectionProtocol;
import net.minecraft.network.TickablePacketListener;
+import net.minecraft.network.chat.ChatDecorator;
import net.minecraft.network.chat.ChatType;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.LastSeenMessages;
@@ -196,6 +197,8 @@ import net.minecraft.world.phys.shapes.VoxelShape;
@@ -195,6 +196,8 @@ import net.minecraft.world.phys.shapes.VoxelShape;
import org.slf4j.Logger;
// CraftBukkit start
@ -2838,7 +2838,7 @@ index c72c5d0fa96e92539a0e7175a161ed2b8d99d629..ad965076a31b947afc65fdf3a03972f4
import com.mojang.datafixers.util.Pair;
import java.util.Arrays;
import java.util.concurrent.ExecutionException;
@@ -1717,9 +1720,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1711,9 +1714,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
*/
this.player.disconnect();
@ -2853,7 +2853,7 @@ index c72c5d0fa96e92539a0e7175a161ed2b8d99d629..ad965076a31b947afc65fdf3a03972f4
}
// CraftBukkit end
this.player.getTextFilter().leave();
@@ -1780,10 +1785,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1774,10 +1779,10 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
CompletableFuture<FilteredText> completablefuture = this.filterTextPacket(playerchatmessage.signedContent()).thenApplyAsync(Function.identity(), this.server.chatExecutor); // CraftBukkit - async chat
@ -2867,7 +2867,7 @@ index c72c5d0fa96e92539a0e7175a161ed2b8d99d629..ad965076a31b947afc65fdf3a03972f4
this.broadcastChatMessage(playerchatmessage1);
});
@@ -2003,7 +2008,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1997,7 +2002,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
@ -2884,7 +2884,7 @@ index c72c5d0fa96e92539a0e7175a161ed2b8d99d629..ad965076a31b947afc65fdf3a03972f4
Player player = this.getCraftPlayer();
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
String originalFormat = event.getFormat(), originalMessage = event.getMessage();
@@ -2306,7 +2319,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2300,7 +2313,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void sendPlayerChatMessage(PlayerChatMessage message, ChatType.Bound params) {
// CraftBukkit start - SPIGOT-7262: if hidden we have to send as disguised message. Query whether we should send at all (but changing this may not be expected).
@ -2897,7 +2897,7 @@ index c72c5d0fa96e92539a0e7175a161ed2b8d99d629..ad965076a31b947afc65fdf3a03972f4
this.sendDisguisedChatMessage(message.decoratedContent(), params);
return;
}
@@ -3000,6 +3017,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2994,6 +3011,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void handleClientInformation(ServerboundClientInformationPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
this.player.updateOptions(packet.information());
@ -2906,7 +2906,7 @@ index c72c5d0fa96e92539a0e7175a161ed2b8d99d629..ad965076a31b947afc65fdf3a03972f4
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index a9e275f80150eab7d048154429d21d0e92510532..eb69b213a75df72dd7b37f41d86564f7fc692e32 100644
index 47a1c62dd6f927cb01f679a597d1526bbca9e433..7beda9a16addb2dbcd4bdc45e58b343e91323af5 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -331,7 +331,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@ -3201,7 +3201,7 @@ index ed54c81a3269360acce674aa4e1d54ccb2461841..c9c849534c3998cfcab7ddcb12a71ccb
}
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 2535cbf50087a4631c4d1027a61b173121d729bc..04d8cfd0ef3cb9c60e93136376ae90144f3cb7ce 100644
index 2b8b220bf1e132b230abe14770da53de84db9818..7ca60db3a639e68456933f8e5af900dc4aade575 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -164,7 +164,16 @@ public final class ItemStack implements DataComponentHolder {
@ -3465,7 +3465,7 @@ index 9b299f74336ad0efecd05a4b771ac58549d5fb6a..9e34d3f009184981e4f4cd34b0c0c75b
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index a1b34778332472c09f3191bc72f9eb3df5e54ba4..c793bae3d7c6da5014862c98b08fc3fa2374866d 100644
index 6ce2b09c4bb7153c960a7eed865296a9c93dd1cb..5bbbb9ee266879291e4ff56ad2ee39aa6151bfff 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -162,6 +162,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@ -3519,7 +3519,7 @@ index a1b34778332472c09f3191bc72f9eb3df5e54ba4..c793bae3d7c6da5014862c98b08fc3fa
private static Map<String, GameRules.Key<?>> gamerules;
public static synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() {
@@ -2129,5 +2166,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2125,5 +2162,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
public void setSendViewDistance(final int viewDistance) {
throw new UnsupportedOperationException("Not implemented yet");
}
@ -4059,10 +4059,10 @@ index 55945b83a5426b352bad9507cc9e94afb1278032..9ea1537408ff2d790747b6e5a681d917
public boolean isOp() {
return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9d2af8b74e33888df33425627b286d32c95753d6..2b885e00840171777c08b5f0ffe2488b39e51559 100644
index 13c3ac65f26e6cfc55ee3538b6308ef93f9936aa..aa9049ed3d39ab862978e311ec0bb0dceb648a8a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -385,14 +385,40 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -386,14 +386,40 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getDisplayName() {
@ -4103,7 +4103,7 @@ index 9d2af8b74e33888df33425627b286d32c95753d6..2b885e00840171777c08b5f0ffe2488b
@Override
public String getPlayerListName() {
return this.getHandle().listName == null ? this.getName() : CraftChatMessage.fromComponent(this.getHandle().listName);
@@ -404,6 +430,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -405,6 +431,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
name = this.getName();
}
this.getHandle().listName = name.equals(this.getName()) ? null : CraftChatMessage.fromStringOrNull(name);
@ -4111,7 +4111,7 @@ index 9d2af8b74e33888df33425627b286d32c95753d6..2b885e00840171777c08b5f0ffe2488b
for (ServerPlayer player : (List<ServerPlayer>) this.server.getHandle().players) {
if (player.getBukkitEntity().canSee(this)) {
player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, this.getHandle()));
@@ -411,42 +438,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -412,42 +439,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}
@ -4163,7 +4163,7 @@ index 9d2af8b74e33888df33425627b286d32c95753d6..2b885e00840171777c08b5f0ffe2488b
this.getHandle().connection.send(packet);
}
@@ -478,6 +505,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -479,6 +506,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.disconnect(message == null ? "" : message);
}
@ -4187,7 +4187,7 @@ index 9d2af8b74e33888df33425627b286d32c95753d6..2b885e00840171777c08b5f0ffe2488b
@Override
public void setCompassTarget(Location loc) {
Preconditions.checkArgument(loc != null, "Location cannot be null");
@@ -774,6 +818,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -775,6 +819,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}
@ -4212,7 +4212,7 @@ index 9d2af8b74e33888df33425627b286d32c95753d6..2b885e00840171777c08b5f0ffe2488b
@Override
public void sendSignChange(Location loc, String[] lines) {
this.sendSignChange(loc, lines, DyeColor.BLACK);
@@ -797,6 +859,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -798,6 +860,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return;
Component[] components = CraftSign.sanitizeLines(lines);
@ -4221,19 +4221,10 @@ index 9d2af8b74e33888df33425627b286d32c95753d6..2b885e00840171777c08b5f0ffe2488b
+ }
+
+ private void sendSignChange0(Component[] components, Location loc, DyeColor dyeColor, boolean hasGlowingText) {
SignBlockEntity sign = new SignBlockEntity(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
sign.setLevel(this.getHandle().level());
SignText text = sign.getFrontText();
@@ -807,7 +874,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
sign.setText(text, true);
- this.getHandle().connection.send(sign.getUpdatePacket());
+ getHandle().connection.send(sign.getUpdatePacket());
+ // Paper end
}
@Override
SignBlockEntity sign = new SignBlockEntity(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
SignText text = sign.getFrontText();
text = text.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData()));
@@ -1805,7 +1873,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
@ -4312,7 +4303,7 @@ index 9d2af8b74e33888df33425627b286d32c95753d6..2b885e00840171777c08b5f0ffe2488b
@Override
public void removeResourcePack(UUID id) {
Preconditions.checkArgument(id != null, "Resource pack id cannot be null");
@@ -2272,6 +2393,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2268,6 +2389,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return (this.getHandle().requestedViewDistance() == 0) ? Bukkit.getViewDistance() : this.getHandle().requestedViewDistance();
}
@ -4325,7 +4316,7 @@ index 9d2af8b74e33888df33425627b286d32c95753d6..2b885e00840171777c08b5f0ffe2488b
@Override
public int getPing() {
return this.getHandle().connection.latency();
@@ -2322,6 +2449,249 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2318,6 +2445,249 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().allowsListing();
}
@ -4976,7 +4967,7 @@ index 61ad00c38cfef8a1de61b4597ec1042428feccf4..4c308de19e26b228151dc05606dd6339
if (this.pages != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
index 6691950f6ffb8b6bf70d5aaf011ec9b476974d19..31054e7e1d69bfeeb2ddee5bfeb8ee500d9c2efc 100644
index 9c57b883783145ad4483481a2c2e7f0f188cd174..3795207a024ddf2e93baa09bcce56a1253eec8ed 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.inventory;
@ -4988,7 +4979,7 @@ index 6691950f6ffb8b6bf70d5aaf011ec9b476974d19..31054e7e1d69bfeeb2ddee5bfeb8ee50
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -342,7 +342,7 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
@@ -346,7 +346,7 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
}
@Override
@ -4997,7 +4988,7 @@ index 6691950f6ffb8b6bf70d5aaf011ec9b476974d19..31054e7e1d69bfeeb2ddee5bfeb8ee50
super.serialize(builder);
if (this.hasTitle()) {
@@ -455,4 +455,25 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
@@ -459,4 +459,25 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
return this.spigot;
}
// Spigot end
@ -5024,7 +5015,7 @@ index 6691950f6ffb8b6bf70d5aaf011ec9b476974d19..31054e7e1d69bfeeb2ddee5bfeb8ee50
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 625035216d1ce4ab965b5eef15f1201fc5df576b..18efbab29f20436848894c66541aa6c7d3481aae 100644
index 2a0803ed63be1adafec3e6e1cf57a84c867d0b57..6b63fec6bc646b6faf2151a786ef47c87848520e 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -843,6 +843,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@ -5417,7 +5408,7 @@ index 4d586e1375ed8782939c9d480479e0dd981f8cbc..7900adb0b158bc17dd792dd082c33854
+
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
index 9fc85104dd934425ea2ba379cac1c3e61388f7d8..f07234e19dc9f84ff4f4b5e5e811e2813184978b 100644
index b963d471b33cacaeec385dba6b2bf369e3d4426f..51094fe6e37d3c0fad2682353f8de3d1b9c9aef5 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
@@ -299,6 +299,7 @@ public final class CraftChatMessage {

Datei anzeigen

@ -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 e6d4db67bdee5a0f980a74c38f00d760882bdfeb..c7980981d994f3256bbb861a5e044a4563c88ad3 100644
index c0a078302223202db37d2ed9ecf20716ed7706a5..7fb99f67edf961bb31e3f77049d2d3eb7bb148bc 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -6,9 +6,30 @@ plugins {

Datei anzeigen

@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing
the plugin logger.
diff --git a/build.gradle.kts b/build.gradle.kts
index c7980981d994f3256bbb861a5e044a4563c88ad3..7a3b14da65a60326faa009a7c824d727610683bf 100644
index 7fb99f67edf961bb31e3f77049d2d3eb7bb148bc..012dbc51b70e24d01e03df5471196249cd534bb8 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -25,7 +25,7 @@ dependencies {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread
diff --git a/build.gradle.kts b/build.gradle.kts
index 7a3b14da65a60326faa009a7c824d727610683bf..b29cd3fba110261dfabb7b63c44ff850393a6480 100644
index 012dbc51b70e24d01e03df5471196249cd534bb8..c0cde2b74865070c6901cbc5809e8f79d14969b2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -34,8 +34,7 @@ dependencies {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
diff --git a/build.gradle.kts b/build.gradle.kts
index b29cd3fba110261dfabb7b63c44ff850393a6480..79011b24207ec46872ba7196a4dd8d7a7c4ce848 100644
index c0cde2b74865070c6901cbc5809e8f79d14969b2..cc8f024fec9c1f928e0d218d19794eb1478f5d07 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -34,6 +34,7 @@ dependencies {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Plugin remapping
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
diff --git a/build.gradle.kts b/build.gradle.kts
index 79011b24207ec46872ba7196a4dd8d7a7c4ce848..33c3cc405c67d536c8a3038b83fd470fda10680e 100644
index cc8f024fec9c1f928e0d218d19794eb1478f5d07..5f94206910467c3302da5a995da5f74961a3365a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -46,9 +46,14 @@ dependencies {

Datei anzeigen

@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're
debugging in an IDE pre-relocate.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb085e3636 100644
index 2b0cf967e382e982200d73857b08c0f01a4e409c..8420a53672cfb0f060d9c85c445d200b6701f521 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -7,6 +7,7 @@ import java.io.InputStream;
@ -27,9 +27,9 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
@@ -62,6 +64,40 @@ public class Commodore {
"org/spigotmc/event/entity/EntityDismountEvent", "org/bukkit/event/entity/EntityDismountEvent"
);
@@ -73,6 +75,40 @@ public class Commodore {
public static final List<Map<String, RerouteMethodData>> REROUTES = new ArrayList<>(); // Only used for testing
private static final Map<String, RerouteMethodData> FIELD_RENAME_METHOD_REROUTE = Commodore.createReroutes(FieldRename.class);
+ // Paper start - Plugin rewrites
+ private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
@ -65,10 +65,10 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
+ }
+ // Paper end - Plugin rewrites
+
private static final Map<String, RerouteMethodData> FIELD_RENAME_METHOD_REROUTE = RerouteBuilder.buildFromClass(FieldRename.class);
public static void main(String[] args) {
@@ -190,9 +226,49 @@ public class Commodore {
OptionParser parser = new OptionParser();
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
@@ -199,9 +235,49 @@ public class Commodore {
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
@ -118,7 +118,7 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
name = FieldRename.rename(pluginVersion, owner, name);
if (modern) {
@@ -296,6 +372,13 @@ public class Commodore {
@@ -305,6 +381,13 @@ public class Commodore {
return;
}
@ -132,7 +132,7 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
if (modern) {
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
switch (name) {
@@ -399,6 +482,13 @@ public class Commodore {
@@ -408,6 +491,13 @@ public class Commodore {
@Override
public void visitLdcInsn(Object value) {
@ -146,7 +146,7 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
return;
@@ -409,6 +499,14 @@ public class Commodore {
@@ -418,6 +508,14 @@ public class Commodore {
@Override
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
@ -161,7 +161,7 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
Type samMethodType = (Type) bootstrapMethodArguments[0];
@@ -425,7 +523,7 @@ public class Commodore {
@@ -434,7 +532,7 @@ public class Commodore {
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
methodArgs.add(newInstantiated);
@ -170,7 +170,7 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
return;
}
@@ -476,6 +574,12 @@ public class Commodore {
@@ -485,6 +583,12 @@ public class Commodore {
@Override
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Remap reflection calls in plugins using internals
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
diff --git a/build.gradle.kts b/build.gradle.kts
index 33c3cc405c67d536c8a3038b83fd470fda10680e..ab1aaf53f9a897982c93b754b8dbe8b6f4812f21 100644
index 5f94206910467c3302da5a995da5f74961a3365a..b995ea46b0fabdab6d398aa1980f9d801460b772 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -34,7 +34,6 @@ dependencies {
@ -658,11 +658,11 @@ index 457a963ee6ebd3cf5c3831f6660e3850335af49f..61744d8fde3ba98585cf261fc09f0acc
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index 072153a601eb257bd36bba24f356d4eb085e3636..c2f46c2d7c4035848724cdccdce23f45774e338c 100644
index 8420a53672cfb0f060d9c85c445d200b6701f521..fc04bfcb8b5dfa6d093c8d75b2f20c502ef94a63 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -65,36 +65,26 @@ public class Commodore {
);
@@ -76,36 +76,26 @@ public class Commodore {
private static final Map<String, RerouteMethodData> FIELD_RENAME_METHOD_REROUTE = Commodore.createReroutes(FieldRename.class);
// Paper start - Plugin rewrites
- private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
@ -709,7 +709,7 @@ index 072153a601eb257bd36bba24f356d4eb085e3636..c2f46c2d7c4035848724cdccdce23f45
}
// Paper end - Plugin rewrites
@@ -167,7 +157,7 @@ public class Commodore {
@@ -176,7 +166,7 @@ public class Commodore {
ClassReader cr = new ClassReader(b);
ClassWriter cw = new ClassWriter(cr, 0);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add WorldEdit plugin flag test task
diff --git a/build.gradle.kts b/build.gradle.kts
index ab1aaf53f9a897982c93b754b8dbe8b6f4812f21..0aa7351e918a577f231a209443389d4bfdb4a93e 100644
index b995ea46b0fabdab6d398aa1980f9d801460b772..2902bbff8d4aff8d09eaa6b7e4f6c604c42dac29 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,9 +1,11 @@

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] build: replace use of shadow plugin
diff --git a/build.gradle.kts b/build.gradle.kts
index 0aa7351e918a577f231a209443389d4bfdb4a93e..e8f0f110532ad63be170152082dd5805a3e3c12c 100644
index 2902bbff8d4aff8d09eaa6b7e4f6c604c42dac29..fec06ac47cf190bf4d5d743c34e4a90b99a0af18 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,7 +4,6 @@ import xyz.jpenilla.runpaper.task.RunServer

Datei anzeigen

@ -1230,10 +1230,10 @@ index 9332573e6948092ea1cda4efa7f3944729da91be..476b513e05a8ef099a17db44732ebc8e
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 ad965076a31b947afc65fdf3a03972f407235e92..4a37313ea0f2253f377ea5d0d2c2d7b66c599ffe 100644
index 86d0207a36df67bf0554193bf050e035aeecc5c9..e63aadfe5209978f5d515ef9c37df01e08cd8fdb 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -336,7 +336,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -330,7 +330,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void tick() {
@ -1241,7 +1241,7 @@ index ad965076a31b947afc65fdf3a03972f407235e92..4a37313ea0f2253f377ea5d0d2c2d7b6
if (this.ackBlockChangesUpTo > -1) {
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
this.ackBlockChangesUpTo = -1;
@@ -403,7 +402,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -397,7 +396,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
this.disconnect(Component.translatable("multiplayer.disconnect.idling"));
}
@ -1249,7 +1249,7 @@ index ad965076a31b947afc65fdf3a03972f407235e92..4a37313ea0f2253f377ea5d0d2c2d7b6
}
@@ -2092,7 +2090,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2086,7 +2084,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
private void handleCommand(String s) {
@ -1258,7 +1258,7 @@ index ad965076a31b947afc65fdf3a03972f407235e92..4a37313ea0f2253f377ea5d0d2c2d7b6
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
@@ -2102,7 +2100,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2096,7 +2094,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.cserver.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -1267,7 +1267,7 @@ index ad965076a31b947afc65fdf3a03972f407235e92..4a37313ea0f2253f377ea5d0d2c2d7b6
return;
}
@@ -2115,7 +2113,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2109,7 +2107,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
} finally {
@ -1337,7 +1337,7 @@ index 9c54bc3897d1fa3c88a5a7d55224eb4cc97f4e79..09ce9511f52f7f8643fedc325c49580e
private boolean isStateClimbable(BlockState state) {
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 4bdd6529dfc7f51c8e58e93cf140025ed8a4e44f..5e31d2799c299e5c3d4c02871f785179a2422323 100644
index 1099a85ab7e98d8652cdd1c318f269ca31f4d783..606dbc398745b689f957e62ebd9eaa56a67a61f3 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -339,6 +339,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@ -1805,10 +1805,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2b885e00840171777c08b5f0ffe2488b39e51559..f18ba33cc02b98e389f16c8ca174a832537ebce9 100644
index aa9049ed3d39ab862978e311ec0bb0dceb648a8a..e27712775a494c27030e3aa824e36ec8c217b1ea 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2767,6 +2767,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2763,6 +2763,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Support components in ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 18efbab29f20436848894c66541aa6c7d3481aae..f9340ce662157bc141b515b02db5f8d9aa116f32 100644
index 6b63fec6bc646b6faf2151a786ef47c87848520e..d8804be1f36872d12484d9b4327d669d19e7c573 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -860,11 +860,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@ -69,7 +69,7 @@ index 18efbab29f20436848894c66541aa6c7d3481aae..f9340ce662157bc141b515b02db5f8d9
@Override
public boolean hasCustomModelData() {
return this.customModelData != null;
@@ -1654,6 +1689,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1661,6 +1696,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
for (Object object : addFrom) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Allow nerfed mobs to jump
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 7d04a18f62411f00dc7be59564ac6c292834c08a..af1d4cab8ffa3b20dc7aa3af5d1cf8039ef9736f 100644
index 2e83e5779d5bdfc150257d3394669d53eba5c5c3..895971f238b693afbf382d9951adb636d1efef2d 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -126,6 +126,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
@ -16,7 +16,7 @@ index 7d04a18f62411f00dc7be59564ac6c292834c08a..af1d4cab8ffa3b20dc7aa3af5d1cf803
public GoalSelector targetSelector;
@Nullable
private LivingEntity target;
@@ -932,7 +933,15 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
@@ -935,7 +936,15 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
@Override
protected final void serverAiStep() {
++this.noActionTime;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable entity despawn distances
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index af1d4cab8ffa3b20dc7aa3af5d1cf8039ef9736f..9dcd90b8e027075ccec0902bd1b13f82f6fe1bcd 100644
index 895971f238b693afbf382d9951adb636d1efef2d..a61f25425893024571a85cf563ec41cfc7b52325 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -908,14 +908,14 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
@@ -911,14 +911,14 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
if (entityhuman != null) {
double d0 = entityhuman.distanceToSqr((Entity) this);

Datei anzeigen

@ -21,10 +21,10 @@ index 3126e8cab3c40e3af47f4c8925e1c6a9523309ba..3207166061bf9c4d7bf3f38e5a9f7aff
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
double d4 = max * max;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 9dcd90b8e027075ccec0902bd1b13f82f6fe1bcd..14d1222286c7387eca828a9380053f14e4539b3c 100644
index a61f25425893024571a85cf563ec41cfc7b52325..0e88a2212435ff70b5ee661de3977df2b456b29b 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -904,7 +904,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
@@ -907,7 +907,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
if (this.level().getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
@ -135,10 +135,10 @@ index f38f62e777d88a783e1e3b7e1a48da921cc67cf4..77ae7882a08441d9a80b50492be5e484
for (Player player : this.players()) {
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f18ba33cc02b98e389f16c8ca174a832537ebce9..476f1270344358660ce313e6a1d1ebbb42792c59 100644
index e27712775a494c27030e3aa824e36ec8c217b1ea..f66adfdf41835b185aec5e7f50c768e7894c951f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2409,6 +2409,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2405,6 +2405,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.getHandle().language;
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Only refresh abilities if needed
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 476f1270344358660ce313e6a1d1ebbb42792c59..16aa9c45bdbac13f3f34040b68614dbe03cb3fb8 100644
index f66adfdf41835b185aec5e7f50c768e7894c951f..e37f9009a6eb83da610af2cba98c35d19547443c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2082,12 +2082,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -39,10 +39,10 @@ index d75c3c10dcbd777796e479b9538e5254857ac07c..ab2336a30c1ffc1698c327c031a648d4
// CraftBukkit end
this.language = clientOptions.language();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 16aa9c45bdbac13f3f34040b68614dbe03cb3fb8..f4495e24f825c8bbd2d51e2e56b30815c2156cf2 100644
index e37f9009a6eb83da610af2cba98c35d19547443c..86aaec4e639e0abf05531519d2ee5b9b1f8f7517 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2407,7 +2407,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2403,7 +2403,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getLocale() {

Datei anzeigen

@ -17,10 +17,10 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4a37313ea0f2253f377ea5d0d2c2d7b66c599ffe..a944eb2b5dbc2a44c32cf9ea794c9b225de16a70 100644
index e63aadfe5209978f5d515ef9c37df01e08cd8fdb..84c53376312e5f2253521ce2fcac756bc1e5365f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2002,7 +2002,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1996,7 +1996,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
OutgoingChatMessage outgoing = OutgoingChatMessage.create(original);
@ -29,7 +29,7 @@ index 4a37313ea0f2253f377ea5d0d2c2d7b66c599ffe..a944eb2b5dbc2a44c32cf9ea794c9b22
this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
@@ -2089,7 +2089,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2083,7 +2083,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
}
@ -53,10 +53,10 @@ index b43dae6ed6ebdd1978e35e9d43e07591f90dcb09..4a1305df41c42be65dbb0438066e148e
if (this.commandMap.dispatch(sender, commandLine)) {
return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f4495e24f825c8bbd2d51e2e56b30815c2156cf2..5bb906ae7b2aab9601aa8dac492ba221345f5bac 100644
index 86aaec4e639e0abf05531519d2ee5b9b1f8f7517..d50da3bc2dc3b6da13321d19d2eb501df8987461 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -543,7 +543,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -544,7 +544,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Player Tab List and Title APIs
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5bb906ae7b2aab9601aa8dac492ba221345f5bac..a0eaf651444e59315a3a68ae96a18b59742e2b65 100644
index d50da3bc2dc3b6da13321d19d2eb501df8987461..7097c7b8e76478af9d0bae366b0d55c9a86e5127 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -383,6 +383,98 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -384,6 +384,98 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}

Datei anzeigen

@ -16,7 +16,7 @@ The wanted destination was on top of the emerald block however the player ended
This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a0eaf651444e59315a3a68ae96a18b59742e2b65..d40143d8d551d1f4df37b85a72109f53cf7ae10b 100644
index 7097c7b8e76478af9d0bae366b0d55c9a86e5127..6229a21596892064b1d7b5cfc723ab5bcd4fa36e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1235,7 +1235,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index 70a22e140050273ae420e8dc414eab6d08e78617..d0178fc884b57cda9090a80716685994ca1a323e 100644
index 26b8a69a528db8a836b138a2a223c385508ce2c4..5f5d8ae29ff702eacc72341fae074a05d977e7cd 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -190,7 +190,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -201,7 +201,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
callback.packEventReceived(packet.id(), net.kyori.adventure.resource.ResourcePackStatus.valueOf(packet.action().name()), this.getCraftPlayer());
}
// Paper end
@ -22,10 +22,10 @@ index 70a22e140050273ae420e8dc414eab6d08e78617..d0178fc884b57cda9090a80716685994
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d40143d8d551d1f4df37b85a72109f53cf7ae10b..4e80ed2d52caf3869138b76fda00a71d92cda766 100644
index 6229a21596892064b1d7b5cfc723ab5bcd4fa36e..6aebd2fcd8490b6ffb60af9aab5b7f30c4cc2453 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -205,6 +205,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -206,6 +206,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private double healthScale = 20;
private CraftWorldBorder clientWorldBorder = null;
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();

Datei anzeigen

@ -76,7 +76,7 @@ index b49eb019cce58049c2b3a0e80e3d08998b16f7ea..dd6bf199f22476ef1d0f704883b748be
public Mutable(ItemEnchantments enchantmentsComponent) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 1f99a9b9a0510ab19a5913588d6d677d6cada5e5..09c363f483cb12be01afd9a274c541f3bdeb992c 100644
index b6521462d193bff83ace1dc694c6d957a7173969..d302767e8f01fdfcba9c22e2e35677afc18c0641 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -191,16 +191,11 @@ public final class CraftItemStack extends ItemStack {
@ -144,7 +144,7 @@ index 1f99a9b9a0510ab19a5913588d6d677d6cada5e5..09c363f483cb12be01afd9a274c541f3
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index f9340ce662157bc141b515b02db5f8d9aa116f32..d9583b6f4e78a3fac594a7448e105507f33caa91 100644
index d8804be1f36872d12484d9b4327d669d19e7c573..122142125dcba97572b1e0b9195e534a0e2257d9 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
@ -242,7 +242,7 @@ index f9340ce662157bc141b515b02db5f8d9aa116f32..d9583b6f4e78a3fac594a7448e105507
}
if (this.hasAttributeModifiers()) {
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
@@ -1805,4 +1808,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1812,4 +1815,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return (result != null) ? result : Optional.empty();
}

Datei anzeigen

@ -44,7 +44,7 @@ index 53da8935e076d56f0a5423e5c1bdcdddc7cbd882..f02b12f3853bf4bf29b59a505f06cb98
protected void internalSetAbsorptionAmount(float absorptionAmount) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4e80ed2d52caf3869138b76fda00a71d92cda766..deeab3b8ab258e5914a05190704a78d895dc9f33 100644
index 6aebd2fcd8490b6ffb60af9aab5b7f30c4cc2453..b3e1ee818e87d9bbe6bbbfce715aca8720928c1c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2327,6 +2327,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -28,10 +28,10 @@ index 1e9c68cd1868d083e6a790d56006dd4aa432010a..8a0ee9564fc36a2badf1357f7e6c47b5
+ // Paper end - PlayerUseUnknownEntityEvent
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a944eb2b5dbc2a44c32cf9ea794c9b225de16a70..00043179d939e95734d56d221d79c0996321f875 100644
index 84c53376312e5f2253521ce2fcac756bc1e5365f..444c3d396c117be4de314aafa1625ef69fabf601 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2486,7 +2486,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2480,7 +2480,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
});
}
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 00043179d939e95734d56d221d79c0996321f875..053c1299d657dba38308b9d0fddd7416c357364d 100644
index 444c3d396c117be4de314aafa1625ef69fabf601..e95251f21dd500850767a9bd3e9512c87bdaaec2 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1528,13 +1528,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1522,13 +1522,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Spigot start - limit place/interactions
private int limitedPackets;
private long lastLimitedPacket = -1;

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 053c1299d657dba38308b9d0fddd7416c357364d..19b4e2a2c01a10642ced9bdffc0acb661b270741 100644
index e95251f21dd500850767a9bd3e9512c87bdaaec2..f75216148bc8b3e357111ff624d8b43592d5d16b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -352,7 +352,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -346,7 +346,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger() && !this.player.isDeadOrDying()) {
if (++this.aboveGroundTickCount > this.getMaximumFlyingTicks(this.player)) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
@ -17,7 +17,7 @@ index 053c1299d657dba38308b9d0fddd7416c357364d..19b4e2a2c01a10642ced9bdffc0acb66
return;
}
} else {
@@ -371,7 +371,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -365,7 +365,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (this.clientVehicleIsFloating && this.lastVehicle.getControllingPassenger() == this.player) {
if (++this.aboveGroundVehicleTickCount > this.getMaximumFlyingTicks(this.lastVehicle)) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index eb69b213a75df72dd7b37f41d86564f7fc692e32..b03d4f12e89b8a5fe6ad2282f8cc2909b87795a9 100644
index 7beda9a16addb2dbcd4bdc45e58b343e91323af5..d342d569eb93707bc683c3373ea88ae6b885a476 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -69,6 +69,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] String based Action Bar API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index deeab3b8ab258e5914a05190704a78d895dc9f33..7884108bddd9d56550dcce3e2d00affb27e07fb1 100644
index b3e1ee818e87d9bbe6bbbfce715aca8720928c1c..f7eb58914dd561734e1f5ab0aec5775f3ecf937b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -385,6 +385,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -386,6 +386,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper start

Datei anzeigen

@ -19,10 +19,10 @@ index 532282ba4432f55596337f7a0898ecc3d5dc2148..82498ec7f0de4c1b82c7882824587ed3
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index d0178fc884b57cda9090a80716685994ca1a323e..d9a22808381bd8b1be691cf879f5be8cc3add81c 100644
index 5f5d8ae29ff702eacc72341fae074a05d977e7cd..fc2fd0842e25fbe5c46ae07200c4b1a5950ae29a 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -167,7 +167,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -178,7 +178,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
}
public final boolean isDisconnected() {

Datei anzeigen

@ -20,7 +20,7 @@ index 004dd17181a49df5c2255a9eeca03f5a354920aa..ec6640bc761b6232d6b48a32fae11e60
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
private boolean tickingBlockEntities;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c793bae3d7c6da5014862c98b08fc3fa2374866d..b42d482defda5a91f4e625308d5fec8c8369e5fb 100644
index 5bbbb9ee266879291e4ff56ad2ee39aa6151bfff..705cfb8ac38ee49adfb36a93b6939c975bbe95e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -164,6 +164,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future?
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 19b4e2a2c01a10642ced9bdffc0acb661b270741..03384eea3601869651a7539fc09a0a2d396137d2 100644
index f75216148bc8b3e357111ff624d8b43592d5d16b..9e26cd52dfe77049019a417cd3999103647c037f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2248,6 +2248,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2242,6 +2242,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
switch (packet.getAction()) {
case PRESS_SHIFT_KEY:
this.player.setShiftKeyDown(true);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 14d1222286c7387eca828a9380053f14e4539b3c..b740d931ad7ad81bf94afa62a9ae44a2fe9549d4 100644
index 0e88a2212435ff70b5ee661de3977df2b456b29b..2f33036a78a120898b18301bae1585c65fdb69dc 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -712,6 +712,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
@@ -715,6 +715,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
ItemEntity entityitem = (ItemEntity) iterator.next();
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Block player logins during server shutdown
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index b03d4f12e89b8a5fe6ad2282f8cc2909b87795a9..93df138ffdf45303ce28ef6bff462b1b14e27f61 100644
index d342d569eb93707bc683c3373ea88ae6b885a476..da300bbe01399eec9d45f68aeb7c214cab4108fb 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -95,6 +95,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 93df138ffdf45303ce28ef6bff462b1b14e27f61..5fb5a82edcd2c1b4ed6747d085f53b5ba0cd039f 100644
index da300bbe01399eec9d45f68aeb7c214cab4108fb..a5b627ce61187696dfce3746c7c06cbaaf1149f5 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -301,7 +301,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 03384eea3601869651a7539fc09a0a2d396137d2..904aab6c4c3434756e25def2acdf5ca7afebb465 100644
index 9e26cd52dfe77049019a417cd3999103647c037f..f6019435a90979ed6f966cc6e8288f05ff889d5e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1210,7 +1210,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1204,7 +1204,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
boolean flag1 = d7 > 0.0D;
if (this.player.onGround() && !packet.isOnGround() && flag1) {

Datei anzeigen

@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
random disconnections for clients.
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index d9a22808381bd8b1be691cf879f5be8cc3add81c..d013b2a02a03f5637043ccc5a9c29c15cc811596 100644
index fc2fd0842e25fbe5c46ae07200c4b1a5950ae29a..8cc454ad3f6b865253bdd4902fbf19fc4a3e4a7f 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -105,14 +105,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -116,14 +116,18 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@Override
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {

Datei anzeigen

@ -90,11 +90,11 @@ index 9214fb6b8e21ff6aee8be0691f1fe6e41c901ba3..644214cc3a3c8e560b6ce470fe5997e3
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7884108bddd9d56550dcce3e2d00affb27e07fb1..831e63386d110fe5581526dc142bd630aca39246 100644
index f7eb58914dd561734e1f5ab0aec5775f3ecf937b..d8e10cc5afc5159b0eeef22ea2ef8b2dcf7655ca 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -331,6 +331,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().transferCookieConnection.send(new ClientboundTransferPacket(host, port));
@@ -332,6 +332,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().transferCookieConnection.sendPacket(new ClientboundTransferPacket(host, port));
}
+ // Paper start - Implement NetworkClient

Datei anzeigen

@ -17,10 +17,10 @@ from networking or during connections flood of chunk packets on slower clients,
at the cost of dead connections being kept open for longer.
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index d013b2a02a03f5637043ccc5a9c29c15cc811596..89c05909c10ef5172693c5d9d8fdf7e6efead53b 100644
index 8cc454ad3f6b865253bdd4902fbf19fc4a3e4a7f..b8b22a2b140b4d757add6eefa562d32430fb7424 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -57,7 +57,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -68,7 +68,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
protected final MinecraftServer server;
public final Connection connection; // Paper
private final boolean transferred;
@ -29,7 +29,7 @@ index d013b2a02a03f5637043ccc5a9c29c15cc811596..89c05909c10ef5172693c5d9d8fdf7e6
private boolean keepAlivePending;
private long keepAliveChallenge;
private long closedListenerTime;
@@ -65,6 +65,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -76,6 +76,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
private int latency;
private volatile boolean suspendFlushingOnServerThread = false;
public final java.util.Map<java.util.UUID, net.kyori.adventure.resource.ResourcePackCallback> packCallbacks = new java.util.concurrent.ConcurrentHashMap<>(); // Paper - adventure resource pack callbacks
@ -37,7 +37,7 @@ index d013b2a02a03f5637043ccc5a9c29c15cc811596..89c05909c10ef5172693c5d9d8fdf7e6
public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) { // CraftBukkit
this.server = minecraftserver;
@@ -215,18 +216,22 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@@ -226,18 +227,22 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
protected void keepConnectionAlive() {
this.server.getProfiler().push("keepAlive");

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Prevent logins from being processed when the player has
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 5fb5a82edcd2c1b4ed6747d085f53b5ba0cd039f..31379b0aee05862dc44f507a64f19a810e0208d5 100644
index a5b627ce61187696dfce3746c7c06cbaaf1149f5..2640041bfacda7612908c41e1506bf6668eb274f 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -102,7 +102,9 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,

Datei anzeigen

@ -69,7 +69,7 @@ index a1c1a101aa424e74309f6f4c0a53a6a8db5df441..013298c424025cd88f15d61e50d196f7
public Biome getBiome() {
return this.getWorld().getBiome(this.getX(), this.getY(), this.getZ());
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index be9c5d928b8dccd0adde9df42ac7306153d1cc5c..fdd6f9e8164efedb3e8f29857ad35ed69e7b299d 100644
index 7c613e345234bada75388930afdae1ed96c7beb8..25b7198c0e0afb7a09b1a68f5a53f5c44244cafb 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -22,15 +22,26 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
@ -101,7 +101,7 @@ index be9c5d928b8dccd0adde9df42ac7306153d1cc5c..fdd6f9e8164efedb3e8f29857ad35ed6
}
protected CraftBlockEntityState(CraftBlockEntityState<T> state, Location location) {
@@ -165,4 +176,11 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
@@ -166,4 +177,11 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
public CraftBlockEntityState<T> copy(Location location) {
return new CraftBlockEntityState<>(this, location);
}
@ -114,7 +114,7 @@ index be9c5d928b8dccd0adde9df42ac7306153d1cc5c..fdd6f9e8164efedb3e8f29857ad35ed6
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
index 9d22f389dfce7b800e29efab767fac842651490a..4c30af81697db25d9913b436c45d9a926cbb5cca 100644
index 1cf2d13ac6addcf61168b95aafa936d4b9432f8a..e40973b65ece11d9c5a76abad51f72e610bf02ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
@@ -387,15 +387,30 @@ public final class CraftBlockStates {

Datei anzeigen

@ -16,10 +16,10 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent
Co-authored-by: Aikar <aikar@aikar.co>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 904aab6c4c3434756e25def2acdf5ca7afebb465..56134a163da44b0bb50121831e91e9f93e86417d 100644
index f6019435a90979ed6f966cc6e8288f05ff889d5e..ae0e3694f3971908cb472b1165d2649265e1bdca 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -714,21 +714,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -708,21 +708,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}

Datei anzeigen

@ -14,7 +14,7 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 831e63386d110fe5581526dc142bd630aca39246..40a1b3a5dde30c1e47c2e0419cca23fc25185419 100644
index d8e10cc5afc5159b0eeef22ea2ef8b2dcf7655ca..f03143b0d061051fcde7538efe57fbd5fc551ab4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1624,7 +1624,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -55,7 +55,7 @@ index 3f2cad4c9c0400bf93932cb7f7219c2185fc7370..5c8e36ea8287029b1789719c687bac1a
if (t0 != null) {
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 5e31d2799c299e5c3d4c02871f785179a2422323..fb621b161b0a47fac2c44b369ed01c27278bc4f6 100644
index 606dbc398745b689f957e62ebd9eaa56a67a61f3..7df13199eacc8dec0ba8fbf10ea507b0d1c5f591 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -430,6 +430,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT

Datei anzeigen

@ -7,7 +7,7 @@ Co-authored-by: Connor Linfoot <connorlinfoot@me.com>
Co-authored-by: MCMDEV <john-m.1@gmx.de>
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 31379b0aee05862dc44f507a64f19a810e0208d5..8f72dafebcca68263eeef4076c3251819815c77d 100644
index 2640041bfacda7612908c41e1506bf6668eb274f..43c77bef408c016ee40454bdebb8662929a0b7f0 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -184,7 +184,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,

Datei anzeigen

@ -9,10 +9,10 @@ This can be useful for changing name or skins after a player has logged in.
public-f net.minecraft.world.entity.player.Player gameProfile
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 56134a163da44b0bb50121831e91e9f93e86417d..82cc40becd6c08364d9547aea0d7ffa5c407c42e 100644
index ae0e3694f3971908cb472b1165d2649265e1bdca..66ca4d1f28143d1e4ce99532c6c2bd64cde67024 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1465,7 +1465,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1459,7 +1459,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.internalTeleport(dest.getX(), dest.getY(), dest.getZ(), dest.getYaw(), dest.getPitch(), Collections.emptySet());
}
@ -22,7 +22,7 @@ index 56134a163da44b0bb50121831e91e9f93e86417d..82cc40becd6c08364d9547aea0d7ffa5
if (Float.isNaN(f)) {
f = 0;
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 8f72dafebcca68263eeef4076c3251819815c77d..96a7d52f982d2dcc5fa391007e5861ca62ec0841 100644
index 43c77bef408c016ee40454bdebb8662929a0b7f0..2ca467bd9c53a59f1ca9b8e1c2cf683182a71910 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -334,11 +334,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@ -77,10 +77,10 @@ index 818df09e9245b5d89b4180b1eaa51470b7539341..461656e1cb095243bfe7a9ee2906e5b0
public Server getServer() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 40a1b3a5dde30c1e47c2e0419cca23fc25185419..981bdd5543a41517f5ead64cdce299cd3725e76c 100644
index f03143b0d061051fcde7538efe57fbd5fc551ab4..4d9c2ce3bdfc2d6df53d49e82e4fec5638cd28d5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -246,11 +246,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -247,11 +247,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.server.getPlayer(this.getUniqueId()) != null;
}
@ -220,10 +220,10 @@ index 40a1b3a5dde30c1e47c2e0419cca23fc25185419..981bdd5543a41517f5ead64cdce299cd
public void onEntityRemove(Entity entity) {
this.invertedVisibilityEntities.remove(entity.getUUID());
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index c2f46c2d7c4035848724cdccdce23f45774e338c..ceeb7381f81daa29f7ac76c68cb3d44886d5ceb5 100644
index fc04bfcb8b5dfa6d093c8d75b2f20c502ef94a63..07239f25bc927c44a9d17f4796db3a107b8e14e0 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -369,6 +369,13 @@ public class Commodore {
@@ -378,6 +378,13 @@ public class Commodore {
}
// Paper end - Rewrite plugins

Datei anzeigen

@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 981bdd5543a41517f5ead64cdce299cd3725e76c..a17bbb4b781870cd9a32a3a6e797ba465808d74f 100644
index 4d9c2ce3bdfc2d6df53d49e82e4fec5638cd28d5..6015ceaa922fd246bb2561a20a8d894444490094 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -206,6 +206,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -207,6 +207,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private CraftWorldBorder clientWorldBorder = null;
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
public org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; // Paper - more resource pack API

Datei anzeigen

@ -34,10 +34,10 @@ index 7be0547f6225a6be6ca1037f63f4aff8759b5dc4..e79329ee9b02a11b55253cf2ce4e08b2
if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b42d482defda5a91f4e625308d5fec8c8369e5fb..c542c932f1f02df69678048e5a8e7c07b68f357d 100644
index 705cfb8ac38ee49adfb36a93b6939c975bbe95e9..8faebe25c0242eaf15a6b67fb1ade71cc46d263e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1957,12 +1957,19 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1957,8 +1957,19 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
@ -47,13 +47,13 @@ index b42d482defda5a91f4e625308d5fec8c8369e5fb..c542c932f1f02df69678048e5a8e7c07
+ @Override
+ public <T> void spawnParticle(Particle particle, List<Player> receivers, Player sender, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
+ // Paper end - Particle API
data = CraftParticle.convertLegacy(data);
if (data != null) {
Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
}
+ data = CraftParticle.convertLegacy(data);
+ if (data != null) {
+ Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
+ }
this.getHandle().sendParticles(
- null, // Sender
+ receivers == null ? getHandle().players() : receivers.stream().map(player -> ((CraftPlayer) player).getHandle()).collect(java.util.stream.Collectors.toList()), // Paper - Particle API
+ receivers == null ? this.getHandle().players() : receivers.stream().map(player -> ((CraftPlayer) player).getHandle()).collect(java.util.stream.Collectors.toList()), // Paper - Particle API
+ sender != null ? ((CraftPlayer) sender).getHandle() : null, // Sender // Paper - Particle API
CraftParticle.createParticleParam(particle, data), // Particle
x, y, z, // Position

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
Allows you to determine how long it takes to use a usable/consumable item
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 09c363f483cb12be01afd9a274c541f3bdeb992c..a58e865a047550cc4508d0515cc6f2fc639f9b3d 100644
index d302767e8f01fdfcba9c22e2e35677afc18c0641..45a1f5123e5413cf8dd3db68bb47508567198403 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -187,6 +187,13 @@ public final class CraftItemStack extends ItemStack {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c542c932f1f02df69678048e5a8e7c07b68f357d..81c12ffb8c0996f081e951af0a68eb985a3b3d3d 100644
index 8faebe25c0242eaf15a6b67fb1ade71cc46d263e..f2e67748d2970207907b3120b0d0fb50744eb7c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -764,6 +764,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 81c12ffb8c0996f081e951af0a68eb985a3b3d3d..59060c33f87db609510df111234b957b51badd87 100644
index f2e67748d2970207907b3120b0d0fb50744eb7c2..2abd68c5a8c53dfc503b732f64b3ba3195244fbf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1100,6 +1100,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -75,10 +75,10 @@ index 84e8ab9bdd4911412732e490ff8d10ba93d67f45..e073b48ed6cbefc503216615f54d09b3
this.doCloseContainer();
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 82cc40becd6c08364d9547aea0d7ffa5c407c42e..36f7a897bd1e0b73c6969cd6d46abe3496098189 100644
index 66ca4d1f28143d1e4ce99532c6c2bd64cde67024..18a0dc407331cc3c85dc84580419e0c241e72435 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2612,10 +2612,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2606,10 +2606,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleContainerClose(ServerboundContainerClosePacket packet) {
@ -165,7 +165,7 @@ index dd3377a4f69e5ac10905e52d0eecc2427e72d856..c79607a2f45b7a487a95cf98b9b0eb6b
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a17bbb4b781870cd9a32a3a6e797ba465808d74f..f161f564a682bf7c5fc9f3ffa0df8fcaa7c2d86c 100644
index 6015ceaa922fd246bb2561a20a8d894444490094..c9af0b1ebf43cbd85d557bd053ef31eb9a975746 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1260,7 +1260,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 36f7a897bd1e0b73c6969cd6d46abe3496098189..b9fb2472405c19afb9888720a9abd86687e9bf12 100644
index 18a0dc407331cc3c85dc84580419e0c241e72435..6755bc8f53253e5fcaaa94f7b505cdbe82d43a57 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2489,6 +2489,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2483,6 +2483,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
if (event.isCancelled()) {

Datei anzeigen

@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b9fb2472405c19afb9888720a9abd86687e9bf12..f49f412781a8f341eda02de323f7298d5f0b25ee 100644
index 6755bc8f53253e5fcaaa94f7b505cdbe82d43a57..dfaed8544c84f00d6092f7acab2193ee0228f9cf 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -266,6 +266,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -265,6 +265,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private int ackBlockChangesUpTo = -1;
// CraftBukkit start - multithreaded fields
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
@ -33,7 +33,7 @@ index b9fb2472405c19afb9888720a9abd86687e9bf12..f49f412781a8f341eda02de323f7298d
// CraftBukkit end
private int dropSpamTickCount;
private double firstGoodX;
@@ -387,6 +388,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -381,6 +382,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.keepConnectionAlive();
// CraftBukkit start
for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ;
@ -41,7 +41,7 @@ index b9fb2472405c19afb9888720a9abd86687e9bf12..f49f412781a8f341eda02de323f7298d
/* Use thread-safe field access instead
if (this.chatSpamTickCount > 0) {
--this.chatSpamTickCount;
@@ -722,7 +724,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -716,7 +718,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - AsyncTabCompleteEvent; run this async
// CraftBukkit start

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Remove unnecessary itemmeta handling
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 04d8cfd0ef3cb9c60e93136376ae90144f3cb7ce..a31a6bb5cd42485a0ada8220f3d0eea15de67ef8 100644
index 7ca60db3a639e68456933f8e5af900dc4aade575..836a9bb57fa6e916ed8a24c35426c6432f73be88 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -177,7 +177,7 @@ public final class ItemStack implements DataComponentHolder {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 59060c33f87db609510df111234b957b51badd87..4a7c418a497b98d5038794b6bbc38f5e0b7fedd7 100644
index 2abd68c5a8c53dfc503b732f64b3ba3195244fbf..932e71656f587678c02766fc8cfb685034368016 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -407,7 +407,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen