geforkt von Mirrors/Paper
275173e538
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: 0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends 255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot CraftBukkit Changes: b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd 44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot 676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
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 4ac91ba7dc754b120189fd32d24076d51b17d7c6..19b0ae77e99c972159cb236403f420baa0cc46e0 100644
|
|
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
|
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
|
@@ -89,7 +89,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) {
|