mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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: 2d009e64 Update SnakeYAML javadoc link b4fd213c Switch Player#updateInventory deprecation for internal API annotation CraftBukkit Changes: f3b2b2210 SPIGOT-7376: Exception with getBlockData when hasBlockData is false 725545630 SPIGOT-7375: Fix crash breeding certain entities b9873b0d4 Update Brigadier version with fix 68b320562 SPIGOT-7266: Found typo in CraftBukkit package 98b4d2ff8 SPIGOT-7372, SPIGOT-7373: Signs can't be edited, issues with SignChangeEvent 5f7bd4d78 SPIGOT-7371: Sign does not open edit text on placement b4cf99d24 SPIGOT-7371: Fix editing signs with API a2b6c2744 PR-1200: Implement open sign by side a345bb940 SPIGOT-7368: Downgrade SpecialSource version Spigot Changes: 723951c3 Rebuild patches b655c57d Drop old collision API deprecated since 1.9.4 55b0fed4 Rebuild patches
This commit is contained in:
parent
251cb43854
commit
aa7c3b02e8
12 changed files with 69 additions and 79 deletions
|
@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
api("com.google.code.gson:gson:2.10")
|
api("com.google.code.gson:gson:2.10")
|
||||||
- api("net.md-5:bungeecord-chat:1.16-R0.4")
|
- api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||||
+ api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.9") // Paper
|
+ api("net.md-5:bungeecord-chat:1.16-R0.4-deprecated+build.9") // Paper
|
||||||
api("org.yaml:snakeyaml:1.33")
|
api("org.yaml:snakeyaml:2.0")
|
||||||
api("org.joml:joml:1.10.5")
|
api("org.joml:joml:1.10.5")
|
||||||
// Paper start
|
// Paper start
|
||||||
@@ -0,0 +0,0 @@ dependencies {
|
@@ -0,0 +0,0 @@ dependencies {
|
||||||
|
@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
compileOnly("org.apache.maven:maven-resolver-provider:3.9.2")
|
compileOnly("org.apache.maven:maven-resolver-provider:3.9.2")
|
||||||
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> {
|
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> {
|
||||||
"https://guava.dev/releases/31.1-jre/api/docs/",
|
"https://guava.dev/releases/31.1-jre/api/docs/",
|
||||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
"https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
|
||||||
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
"https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||||
- "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
- "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
|
|
@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -0,0 +0,0 @@ dependencies {
|
@@ -0,0 +0,0 @@ dependencies {
|
||||||
api("net.md-5:bungeecord-chat:1.16-R0.4")
|
api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||||
api("org.yaml:snakeyaml:1.33")
|
api("org.yaml:snakeyaml:2.0")
|
||||||
api("org.joml:joml:1.10.5")
|
api("org.joml:joml:1.10.5")
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
|
+ api("com.googlecode.json-simple:json-simple:1.1.1") {
|
||||||
|
@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> {
|
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> {
|
||||||
options.links(
|
options.links(
|
||||||
"https://guava.dev/releases/31.1-jre/api/docs/",
|
"https://guava.dev/releases/31.1-jre/api/docs/",
|
||||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
"https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
|
||||||
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
||||||
+ "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
+ "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
|
||||||
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
"https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||||||
|
|
|
@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ api("com.google.guava:guava:31.1-jre")
|
+ api("com.google.guava:guava:31.1-jre")
|
||||||
+ api("com.google.code.gson:gson:2.10")
|
+ api("com.google.code.gson:gson:2.10")
|
||||||
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
|
+ api("net.md-5:bungeecord-chat:1.16-R0.4")
|
||||||
+ api("org.yaml:snakeyaml:1.33")
|
+ api("org.yaml:snakeyaml:2.0")
|
||||||
+ api("org.joml:joml:1.10.5")
|
+ api("org.joml:joml:1.10.5")
|
||||||
+
|
+
|
||||||
+ compileOnly("org.apache.maven:maven-resolver-provider:3.9.2")
|
+ compileOnly("org.apache.maven:maven-resolver-provider:3.9.2")
|
||||||
|
@ -62,7 +62,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||||
+ testImplementation("junit:junit:4.13.2")
|
+ testImplementation("junit:junit:4.13.2")
|
||||||
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
|
+ testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||||
+ testImplementation("org.ow2.asm:asm-tree:9.4")
|
+ testImplementation("org.ow2.asm:asm-tree:9.5")
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+configure<PublishingExtension> {
|
+configure<PublishingExtension> {
|
||||||
|
@ -99,7 +99,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ options.isDocFilesSubDirs = true
|
+ options.isDocFilesSubDirs = true
|
||||||
+ options.links(
|
+ options.links(
|
||||||
+ "https://guava.dev/releases/31.1-jre/api/docs/",
|
+ "https://guava.dev/releases/31.1-jre/api/docs/",
|
||||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
+ "https://javadoc.io/doc/org.yaml/snakeyaml/2.0/",
|
||||||
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/$annotationsVersion/",
|
||||||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||||||
+ )
|
+ )
|
||||||
|
@ -318,7 +318,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
- <configuration>
|
- <configuration>
|
||||||
- <links>
|
- <links>
|
||||||
- <link>https://guava.dev/releases/31.1-jre/api/docs/</link>
|
- <link>https://guava.dev/releases/31.1-jre/api/docs/</link>
|
||||||
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.33/</link>
|
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/2.0/</link>
|
||||||
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/24.0.1/</link>
|
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/24.0.1/</link>
|
||||||
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
|
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
|
||||||
- </links>
|
- </links>
|
||||||
|
|
|
@ -12,17 +12,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
super.applyTo(sign);
|
super.applyTo(sign);
|
||||||
}
|
}
|
||||||
|
|
||||||
- public static void openSign(Sign sign, Player player) {
|
- public static void openSign(Sign sign, Player player, Side side) {
|
||||||
+ public static void openSign(Sign sign, org.bukkit.entity.HumanEntity player) { // Paper - change move open sign to HumanEntity
|
+ public static void openSign(Sign sign, org.bukkit.entity.HumanEntity player, Side side) { // Paper - change move open sign to HumanEntity
|
||||||
Preconditions.checkArgument(sign != null, "sign == null");
|
Preconditions.checkArgument(sign != null, "sign == null");
|
||||||
|
Preconditions.checkArgument(side != null, "side == null");
|
||||||
- Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed");
|
- Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed");
|
||||||
+ // Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed"); // Paper - don't require placed
|
+ // Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed"); // Paper - don't require placed
|
||||||
Preconditions.checkArgument(sign.getWorld() == player.getWorld(), "Sign must be in same world as Player");
|
Preconditions.checkArgument(sign.getWorld() == player.getWorld(), "Sign must be in same world as Player");
|
||||||
|
|
||||||
SignBlockEntity handle = ((CraftSign<?>) sign).getTileEntity();
|
SignBlockEntity handle = ((CraftSign<?>) sign).getTileEntity();
|
||||||
|
|
||||||
- ((CraftPlayer) player).getHandle().openTextEdit(handle, true);
|
- ((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
|
||||||
+ ((org.bukkit.craftbukkit.entity.CraftHumanEntity) player).getHandle().openTextEdit(handle, true); // Paper - change move open sign to HumanEntity
|
+ ((org.bukkit.craftbukkit.entity.CraftHumanEntity) player).getHandle().openTextEdit(handle, Side.FRONT == side); // Paper - change move open sign to HumanEntity
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
|
|
|
@ -2799,31 +2799,29 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
@@ -0,0 +0,0 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
Player player1 = ((ServerPlayer) player).getBukkitEntity();
|
Player player = ((ServerPlayer) entityhuman).getBukkitEntity();
|
||||||
- String[] lines = new String[4];
|
- String[] lines = new String[4];
|
||||||
+ // Paper start
|
+ List<net.kyori.adventure.text.Component> lines = new java.util.ArrayList<>(); // Paper - adventure
|
||||||
+ List<net.kyori.adventure.text.Component> lines = new java.util.ArrayList<>();
|
|
||||||
|
|
||||||
for (int j = 0; j < messages.size(); ++j) {
|
for (int j = 0; j < list.size(); ++j) {
|
||||||
- lines[j] = CraftChatMessage.fromComponent(text.getMessage(j, player.isTextFilteringEnabled()));
|
- lines[j] = CraftChatMessage.fromComponent(signtext.getMessage(j, entityhuman.isTextFilteringEnabled()));
|
||||||
+ lines.add(io.papermc.paper.adventure.PaperAdventure.asAdventure(text.getMessage(j, player.isTextFilteringEnabled())));
|
+ lines.add(io.papermc.paper.adventure.PaperAdventure.asAdventure(signtext.getMessage(j, entityhuman.isTextFilteringEnabled()))); // Paper - adventure
|
||||||
}
|
}
|
||||||
|
|
||||||
SignChangeEvent event = new SignChangeEvent(CraftBlock.at(this.level, this.worldPosition), player1, lines);
|
SignChangeEvent event = new SignChangeEvent(CraftBlock.at(this.level, this.worldPosition), player, lines, (front) ? Side.FRONT : Side.BACK);
|
||||||
player.level().getCraftServer().getPluginManager().callEvent(event);
|
entityhuman.level().getCraftServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
- Component[] components = org.bukkit.craftbukkit.block.CraftSign.sanitizeLines(event.getLines());
|
- Component[] components = org.bukkit.craftbukkit.block.CraftSign.sanitizeLines(event.getLines());
|
||||||
- for (int j = 0; j < components.length; j++) {
|
- for (int j = 0; j < components.length; j++) {
|
||||||
- text = text.setMessage(j, components[j]);
|
- signtext = signtext.setMessage(j, components[j]);
|
||||||
+ // Paper start
|
+ // Paper start - adventure
|
||||||
+ for (int j = 0; j < 4; j++) {
|
+ for (int j = 0; j < 4; j++) {
|
||||||
+ text = text.setMessage(j, io.papermc.paper.adventure.PaperAdventure.asVanilla(lines.get(j)));
|
+ signtext = signtext.setMessage(j, io.papermc.paper.adventure.PaperAdventure.asVanilla(lines.get(j)));
|
||||||
}
|
+ // Paper end - adventure
|
||||||
+ // Paper end
|
|
||||||
}
|
|
||||||
// CraftBukkit end
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
signtext = originalText;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||||
|
@ -3235,7 +3233,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
public String[] getLines() {
|
public String[] getLines() {
|
||||||
return this.front.getLines();
|
return this.front.getLines();
|
||||||
@@ -0,0 +0,0 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
|
@@ -0,0 +0,0 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
|
||||||
((CraftPlayer) player).getHandle().openTextEdit(handle, true);
|
((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -3269,7 +3267,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ private java.util.ArrayList<net.kyori.adventure.text.Component> originalLines = null; // ArrayList for RandomAccess
|
+ private java.util.ArrayList<net.kyori.adventure.text.Component> originalLines = null; // ArrayList for RandomAccess
|
||||||
+ private java.util.ArrayList<net.kyori.adventure.text.Component> lines = null; // ArrayList for RandomAccess
|
+ private java.util.ArrayList<net.kyori.adventure.text.Component> lines = null; // ArrayList for RandomAccess
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
private final SignText signText;
|
private SignText signText;
|
||||||
|
|
||||||
public CraftSignSide(SignText signText) {
|
public CraftSignSide(SignText signText) {
|
||||||
this.signText = signText;
|
this.signText = signText;
|
||||||
|
@ -3344,7 +3342,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@Override
|
@Override
|
||||||
@@ -0,0 +0,0 @@ public class CraftSignSide implements SignSide {
|
@@ -0,0 +0,0 @@ public class CraftSignSide implements SignSide {
|
||||||
|
|
||||||
public void applyLegacyStringToSignSide() {
|
public SignText applyLegacyStringToSignSide() {
|
||||||
if (this.lines != null) {
|
if (this.lines != null) {
|
||||||
- for (int i = 0; i < lines.length; i++) {
|
- for (int i = 0; i < lines.length; i++) {
|
||||||
- String line = (this.lines[i] == null) ? "" : this.lines[i];
|
- String line = (this.lines[i] == null) ? "" : this.lines[i];
|
||||||
|
@ -3356,13 +3354,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ if (component.equals(origComp)) {
|
+ if (component.equals(origComp)) {
|
||||||
continue; // The line contents are still the same, skip.
|
continue; // The line contents are still the same, skip.
|
||||||
}
|
}
|
||||||
- this.signText.setMessage(i, CraftChatMessage.fromString(line)[0]);
|
- this.signText = this.signText.setMessage(i, CraftChatMessage.fromString(line)[0]);
|
||||||
+ this.signText.setMessage(i, io.papermc.paper.adventure.PaperAdventure.asVanilla(component));
|
+ this.signText = this.signText.setMessage(i, io.papermc.paper.adventure.PaperAdventure.asVanilla(component));
|
||||||
}
|
}
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
return this.signText;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
|
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
|
||||||
|
|
|
@ -149,11 +149,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class Animal extends AgeableMob {
|
@@ -0,0 +0,0 @@ public abstract class Animal extends AgeableMob {
|
||||||
if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||||
// CraftBukkit start - use event experience
|
// CraftBukkit start - use event experience
|
||||||
if (experience > 0) {
|
if (experience > 0) {
|
||||||
- world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience));
|
- worldserver.addFreshEntity(new ExperienceOrb(worldserver, this.getX(), this.getY(), this.getZ(), experience));
|
||||||
+ world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, null)); // Paper //TODO trigger
|
+ worldserver.addFreshEntity(new ExperienceOrb(worldserver, this.getX(), this.getY(), this.getZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, null)); // Paper //TODO trigger
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
||||||
Date: Sun, 27 Mar 2022 16:00:28 -0700
|
|
||||||
Subject: [PATCH] Fix NPE for BlockDataMeta#getBlockData
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
|
||||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockData getBlockData(Material material) {
|
|
||||||
- return CraftBlockData.fromData(BlockItem.getBlockState(CraftMagicNumbers.getBlock(material).defaultBlockState(), blockData));
|
|
||||||
+ // Paper start - fix NPE if this.blockData is null
|
|
||||||
+ final net.minecraft.world.level.block.state.BlockState defaultBlockState = CraftMagicNumbers.getBlock(material).defaultBlockState();
|
|
||||||
+ return CraftBlockData.fromData(this.blockData == null ? defaultBlockState : BlockItem.getBlockState(defaultBlockState, blockData));
|
|
||||||
+ // Paper end
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
|
@ -4,19 +4,32 @@ Date: Thu, 26 Apr 2018 04:41:11 -0400
|
||||||
Subject: [PATCH] Fix exploit that allowed colored signs to be created
|
Subject: [PATCH] Fix exploit that allowed colored signs to be created
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/build.gradle.kts
|
||||||
|
+++ b/build.gradle.kts
|
||||||
|
@@ -0,0 +0,0 @@ dependencies {
|
||||||
|
implementation("io.netty:netty-all:4.1.87.Final"); // Paper - Bump netty
|
||||||
|
}
|
||||||
|
|
||||||
|
-val craftbukkitPackageVersion = "1_19_R3" // Paper
|
||||||
|
+val craftbukkitPackageVersion = "1_20_R1" // Paper
|
||||||
|
tasks.jar {
|
||||||
|
archiveClassifier.set("dev")
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
|
||||||
@@ -0,0 +0,0 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
@@ -0,0 +0,0 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
|
||||||
Style chatmodifier = text.getMessage(i, player.isTextFilteringEnabled()).getStyle();
|
Style chatmodifier = signtext.getMessage(i, entityhuman.isTextFilteringEnabled()).getStyle();
|
||||||
|
|
||||||
if (player.isTextFilteringEnabled()) {
|
if (entityhuman.isTextFilteringEnabled()) {
|
||||||
- text = text.setMessage(i, Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier));
|
- signtext = signtext.setMessage(i, Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier));
|
||||||
+ text = text.setMessage(i, Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.filteredOrEmpty())).setStyle(chatmodifier)); // Paper - filter sign text to chat only
|
+ signtext = signtext.setMessage(i, Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.filteredOrEmpty())).setStyle(chatmodifier)); // Paper - filter sign text to chat only
|
||||||
} else {
|
} else {
|
||||||
- text = text.setMessage(i, Component.literal(filteredtext.raw()).setStyle(chatmodifier), Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier));
|
- signtext = signtext.setMessage(i, Component.literal(filteredtext.raw()).setStyle(chatmodifier), Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier));
|
||||||
+ text = text.setMessage(i, Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.raw())).setStyle(chatmodifier), Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.filteredOrEmpty())).setStyle(chatmodifier)); // Paper - filter sign text to chat only
|
+ signtext = signtext.setMessage(i, Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.raw())).setStyle(chatmodifier), Component.literal(net.minecraft.SharedConstants.filterText(filteredtext.filteredOrEmpty())).setStyle(chatmodifier)); // Paper - filter sign text to chat only
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
|
||||||
|
|
|
@ -578,7 +578,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
- <plugin>
|
- <plugin>
|
||||||
- <groupId>net.md-5</groupId>
|
- <groupId>net.md-5</groupId>
|
||||||
- <artifactId>specialsource-maven-plugin</artifactId>
|
- <artifactId>specialsource-maven-plugin</artifactId>
|
||||||
- <version>1.2.5</version>
|
- <version>1.2.4</version>
|
||||||
- <executions>
|
- <executions>
|
||||||
- <execution>
|
- <execution>
|
||||||
- <phase>package</phase>
|
- <phase>package</phase>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3635fe1a771a768acc67a9ab8b3ea184fc724bae
|
Subproject commit 2d009e6420462f8de68db42906fe1f4f4931c3fd
|
|
@ -1 +1 @@
|
||||||
Subproject commit e1188ed3a2f295cba417e59645ca22c97b4587a4
|
Subproject commit f3b2b2210362d2f322fe1999e96453bc4abb98a4
|
|
@ -1 +1 @@
|
||||||
Subproject commit 81b9def3c89c26289118ed0e43ec4df167edd56c
|
Subproject commit 723951c3cf8cf3bb6721b3da29cd262f642fbfb1
|
Loading…
Reference in a new issue