mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Use singleton in Village class to work around null issue that evades
This commit is contained in:
parent
7107d8ae53
commit
044d463764
1 changed files with 9 additions and 0 deletions
|
@ -31,4 +31,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.c = BlockPosition.ZERO;
|
||||
this.d = BlockPosition.ZERO;
|
||||
this.j = new TreeMap();
|
||||
@@ -0,0 +0,0 @@ public class Village {
|
||||
NBTTagCompound nbttagcompound2 = nbttaglist1.get(j);
|
||||
|
||||
if (nbttagcompound2.hasKey("UUID")) {
|
||||
- UserCache usercache = this.a.getMinecraftServer().getUserCache();
|
||||
+ UserCache usercache = MinecraftServer.getServer().getUserCache(); // Paper - Bandaid for world being null
|
||||
GameProfile gameprofile = usercache.a(UUID.fromString(nbttagcompound2.getString("UUID")));
|
||||
|
||||
if (gameprofile != null) {
|
||||
--
|
Loading…
Reference in a new issue