geforkt von Mirrors/Paper
928bcc8d3a
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: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
26 Zeilen
1.2 KiB
Diff
26 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: CDFN <codefun@protonmail.com>
|
|
Date: Tue, 7 Jul 2020 17:53:23 +0200
|
|
Subject: [PATCH] Return chat component with empty text instead of throwing
|
|
exception
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
|
index 823ead0fd1942db0219968cd383439b324b16f6e..49b063655dfc09e30d446dbf07503fdda04a7e30 100644
|
|
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
|
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
|
@@ -88,7 +88,12 @@ public abstract class AbstractContainerMenu {
|
|
}
|
|
private Component title;
|
|
public final Component getTitle() {
|
|
- Preconditions.checkState(this.title != null, "Title not set");
|
|
+ // Paper start - return chat component with empty text instead of throwing error
|
|
+ // Preconditions.checkState(this.title != null, "Title not set");
|
|
+ if(this.title == null){
|
|
+ return Component.literal("");
|
|
+ }
|
|
+ // Paper end
|
|
return this.title;
|
|
}
|
|
public final void setTitle(Component title) {
|