13
0
geforkt von Mirrors/Paper
Paper/patches/server/0446-Don-t-allow-null-UUID-s-for-chat.patch
Nassim Jahnke ef0e5a642d
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:
9ae3f10f SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API
48c0c547 PR-786: Add methods to get sounds from entities

CraftBukkit Changes:
5cc9c022a SPIGOT-7152: Handle hand item changing during air interact event
4ffa1acf6 SPIGOT-7154: Players get kicked when interacting with a conversation
4daa21123 SPIGOT-3842: Add Player#fireworkBoost() and expand Firework API
e5d6a9bbf PR-1100: Add methods to get sounds from entities
b7e9f1c8b SPIGOT-7146: Reduce use of Material switch in ItemMeta

Spigot Changes:
4c157bb4 Rebuild patches
2022-09-12 13:31:45 +02:00

24 Zeilen
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 28 Jun 2020 19:36:55 -0400
Subject: [PATCH] Don't allow null UUID's for chat
diff --git a/src/main/java/net/minecraft/network/chat/ChatSender.java b/src/main/java/net/minecraft/network/chat/ChatSender.java
index eb33c74d51f9b096ac39adf167fa09afdaa5e56b..d3d5487e9a4e95271a88c094058ec9d37a10d370 100644
--- a/src/main/java/net/minecraft/network/chat/ChatSender.java
+++ b/src/main/java/net/minecraft/network/chat/ChatSender.java
@@ -8,6 +8,12 @@ import net.minecraft.world.entity.player.ProfilePublicKey;
public record ChatSender(UUID profileId, @Nullable ProfilePublicKey profilePublicKey) {
public static final ChatSender SYSTEM = new ChatSender(Util.NIL_UUID, (ProfilePublicKey)null);
+ // Paper start
+ public ChatSender {
+ com.google.common.base.Preconditions.checkNotNull(profileId, "uuid cannot be null");
+ }
+ // Paper end
+
public boolean isSystem() {
return SYSTEM.equals(this);
}