3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-16 03:20:07 +01:00
Paper/CraftBukkit-Patches/0096-Convert-Horses-owner-to-UUID.patch

32 Zeilen
1.2 KiB
Diff

2016-03-01 01:23:45 +01:00
From 2dc192572acf60e2b40c07d744e06475ad6b77f8 Mon Sep 17 00:00:00 2001
2014-11-28 02:17:45 +01:00
From: Aikar <aikar@aikar.co>
Date: Wed, 16 Apr 2014 01:40:30 -0400
Subject: [PATCH] Convert Horses owner to UUID
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
2016-03-01 01:23:45 +01:00
index 17a606a..abc7120 100644
2014-11-28 02:17:45 +01:00
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
2016-02-29 22:33:06 +01:00
@@ -983,6 +983,17 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener, IJu
2014-11-28 02:17:45 +01:00
s = nbttagcompound.getString("OwnerUUID");
} else {
String s1 = nbttagcompound.getString("Owner");
+ // Spigot start
+ if ( s1 == null || s1.isEmpty() )
+ {
+ if (nbttagcompound.hasKey("OwnerName")) {
+ String owner = nbttagcompound.getString("OwnerName");
+ if (owner != null && !owner.isEmpty()) {
+ s1 = owner;
+ }
+ }
+ }
+ // Spigot end
2016-02-29 22:33:06 +01:00
s = NameReferencingFileConverter.a(this.h(), s1);
2014-11-28 02:17:45 +01:00
}
--
2016-02-29 22:33:06 +01:00
2.5.0
2014-11-28 02:17:45 +01:00