Paper/Spigot-Server-Patches/0559-Brand-support.patch
2020-11-09 00:09:37 +00:00

20 lines
945 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: DigitalRegent <misterwener@gmail.com>
Date: Sat, 11 Apr 2020 13:10:58 +0200
Subject: [PATCH] Brand support
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 01b554c3caf4322cfc403db24433e3db70b9c579..7f3275b89a6ab745091a42175be916d8997163df 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2193,7 +2193,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start - brand support
@Override
public String getClientBrandName() {
- return getHandle().playerConnection.getClientBrandName();
+ return getHandle().playerConnection != null ? getHandle().playerConnection.getClientBrandName() : null;
}
// Paper end