Waterfall/BungeeCord-Patches/0059-Don-t-bother-locking-to-fetch-a-v4-UUID-from-the-off.patch
Shane Freeder 4015f55f2c
Remove L4J shutdown hook
Allows for the proxy to consistently log during shutdowns no matter
the environment
2022-03-29 13:43:55 +01:00

27 lines
925 B
Diff

From 33d50f1adeab9abcdece0bf5253b7a42760644da Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Fri, 9 Jul 2021 13:20:36 +0100
Subject: [PATCH] Don't bother locking to fetch a v4 UUID from the offline
UUIDs map
diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
index d4df4c17..9ef2b77a 100644
--- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
+++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java
@@ -610,6 +610,11 @@ public class BungeeCord extends ProxyServer
public UserConnection getPlayerByOfflineUUID(UUID name)
{
+ // Waterfall start - Skip lock if we get a v4 UUID, we're not gonna be in here
+ if (name != null && name.version() == 4) {
+ return null;
+ }
+ // Waterfall end
connectionLock.readLock().lock();
try
{
--
2.35.1