mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-12 06:58:11 +02:00
Fix the player's uuid being null in Bungee mode/offline mode
This commit is contained in:
parent
e5290a457a
commit
09e2551bc1
@ -1,14 +1,14 @@
|
|||||||
From f5d25d30e1b929af4439166d271eabc2f6eca2b1 Mon Sep 17 00:00:00 2001
|
From b21ee76703ea474fb5417e41846220635a56b375 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Sat, 13 Dec 2014 12:59:14 +1100
|
Date: Sat, 13 Dec 2014 12:59:14 +1100
|
||||||
Subject: [PATCH] BungeeCord Chat API
|
Subject: [PATCH] BungeeCord Chat API
|
||||||
|
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
index 7be35f3..91cecac 100644
|
index 78f50bd..3e52a20 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -77,6 +77,14 @@
|
@@ -82,6 +82,14 @@
|
||||||
<version>1.14</version>
|
<version>1.14</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From d2ba450a4a2ae61f6d3ba8b45bf56a696d0c7eb4 Mon Sep 17 00:00:00 2001
|
From 8aef7c3b71fe438e210691764d955554efd55040 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Tue, 2 Jul 2013 13:07:39 +1000
|
Date: Tue, 2 Jul 2013 13:07:39 +1000
|
||||||
Subject: [PATCH] POM Changes
|
Subject: [PATCH] POM Changes
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] POM Changes
|
|||||||
Basic changes to the build system which mark the artifact as Spigot, and the necessary code changes to ensure proper functionality. Also disables the auto updater provided by CraftBukkit as it is useless to us.
|
Basic changes to the build system which mark the artifact as Spigot, and the necessary code changes to ensure proper functionality. Also disables the auto updater provided by CraftBukkit as it is useless to us.
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
index 7f49330..eb0128a 100644
|
index 55e2603..1c4f56e 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -1,12 +1,12 @@
|
@@ -1,12 +1,12 @@
|
||||||
@ -51,7 +51,7 @@ index 7f49330..eb0128a 100644
|
|||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>jar</type>
|
<type>jar</type>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
@@ -93,21 +105,39 @@
|
@@ -88,21 +100,39 @@
|
||||||
|
|
||||||
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
||||||
<build>
|
<build>
|
||||||
@ -94,7 +94,7 @@ index 7f49330..eb0128a 100644
|
|||||||
<phase>compile</phase>
|
<phase>compile</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>gitdescribe</goal>
|
<goal>gitdescribe</goal>
|
||||||
@@ -124,7 +154,7 @@
|
@@ -119,7 +149,7 @@
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
|
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
|
||||||
<Implementation-Title>CraftBukkit</Implementation-Title>
|
<Implementation-Title>CraftBukkit</Implementation-Title>
|
||||||
@ -103,7 +103,7 @@ index 7f49330..eb0128a 100644
|
|||||||
<Implementation-Vendor>Bukkit Team</Implementation-Vendor>
|
<Implementation-Vendor>Bukkit Team</Implementation-Vendor>
|
||||||
<Specification-Title>Bukkit</Specification-Title>
|
<Specification-Title>Bukkit</Specification-Title>
|
||||||
<Specification-Version>${api.version}</Specification-Version>
|
<Specification-Version>${api.version}</Specification-Version>
|
||||||
@@ -169,7 +199,7 @@
|
@@ -164,7 +194,7 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<signature>
|
<signature>
|
||||||
<groupId>org.codehaus.mojo.signature</groupId>
|
<groupId>org.codehaus.mojo.signature</groupId>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 47268e1d09430b441ffbd123d6cab9b2da8c9bda Mon Sep 17 00:00:00 2001
|
From 33973c35cda51ba40c37a81cd5772b3003b95c8b Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Tue, 11 Jun 2013 12:56:02 +1000
|
Date: Tue, 11 Jun 2013 12:56:02 +1000
|
||||||
Subject: [PATCH] Better Chunk Tick Selection
|
Subject: [PATCH] Better Chunk Tick Selection
|
||||||
@ -112,10 +112,10 @@ index 345ede9..bed457a 100644
|
|||||||
|
|
||||||
this.methodProfiler.b();
|
this.methodProfiler.b();
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 32bf7ff..383a491 100644
|
index 9f96e11..f4d313e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -343,12 +343,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -344,12 +344,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
protected void h() {
|
protected void h() {
|
||||||
super.h();
|
super.h();
|
||||||
if (this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) {
|
if (this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) {
|
||||||
@ -134,7 +134,7 @@ index 32bf7ff..383a491 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -360,9 +363,21 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -361,9 +364,21 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
// ChunkCoordIntPair chunkcoordintpair1 = (ChunkCoordIntPair) iterator1.next();
|
// ChunkCoordIntPair chunkcoordintpair1 = (ChunkCoordIntPair) iterator1.next();
|
||||||
// int k = chunkcoordintpair1.x * 16;
|
// int k = chunkcoordintpair1.x * 16;
|
||||||
// int l = chunkcoordintpair1.z * 16;
|
// int l = chunkcoordintpair1.z * 16;
|
||||||
@ -159,7 +159,7 @@ index 32bf7ff..383a491 100644
|
|||||||
int k = chunkX * 16;
|
int k = chunkX * 16;
|
||||||
int l = chunkZ * 16;
|
int l = chunkZ * 16;
|
||||||
|
|
||||||
@@ -456,6 +471,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -457,6 +472,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 379a48509beb86d658aad372cde149f162da4277 Mon Sep 17 00:00:00 2001
|
From b0d1021f4563af84588befe541738357b38a8cbb Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <md_5@live.com.au>
|
From: md_5 <md_5@live.com.au>
|
||||||
Date: Sat, 23 Mar 2013 09:52:41 +1100
|
Date: Sat, 23 Mar 2013 09:52:41 +1100
|
||||||
Subject: [PATCH] View Distance
|
Subject: [PATCH] View Distance
|
||||||
@ -22,10 +22,10 @@ index 688d6f0..abb24c8 100644
|
|||||||
|
|
||||||
public WorldServer a() {
|
public WorldServer a() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 383a491..a3c3c78 100644
|
index f4d313e..08b21a5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -60,7 +60,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -61,7 +61,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.server = minecraftserver;
|
this.server = minecraftserver;
|
||||||
this.tracker = new EntityTracker(this);
|
this.tracker = new EntityTracker(this);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 0db746ad5cbf69d3f04721e57e4371d9af9af713 Mon Sep 17 00:00:00 2001
|
From 6b26c0f937b54831297537d4753d9cc6d3acdbcb Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
||||||
Subject: [PATCH] Spigot Timings
|
Subject: [PATCH] Spigot Timings
|
||||||
@ -529,10 +529,10 @@ index a67736a..bf4c758 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index a3c3c78..6ed7078 100644
|
index 08b21a5..af4a551 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -209,10 +209,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -210,10 +210,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
// CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals
|
// CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals
|
||||||
long time = this.worldData.getTime();
|
long time = this.worldData.getTime();
|
||||||
if (this.getGameRules().getBoolean("doMobSpawning") && this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES && (this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.players.size() > 0)) {
|
if (this.getGameRules().getBoolean("doMobSpawning") && this.worldData.getType() != WorldType.DEBUG_ALL_BLOCK_STATES && (this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.players.size() > 0)) {
|
||||||
@ -547,7 +547,7 @@ index a3c3c78..6ed7078 100644
|
|||||||
this.methodProfiler.c("chunkSource");
|
this.methodProfiler.c("chunkSource");
|
||||||
this.chunkProvider.unloadChunks();
|
this.chunkProvider.unloadChunks();
|
||||||
int j = this.a(1.0F);
|
int j = this.a(1.0F);
|
||||||
@@ -226,21 +229,34 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -227,21 +230,34 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
this.worldData.setDayTime(this.worldData.getDayTime() + 1L);
|
this.worldData.setDayTime(this.worldData.getDayTime() + 1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From aefb2679c827a044b2b9d8522b6b0040de3f727f Mon Sep 17 00:00:00 2001
|
From 70a5f335afc7120e0a0ef56dbeb97b90fd0805e8 Mon Sep 17 00:00:00 2001
|
||||||
From: md_5 <git@md-5.net>
|
From: md_5 <git@md-5.net>
|
||||||
Date: Wed, 18 Dec 2013 13:32:10 +1100
|
Date: Wed, 18 Dec 2013 13:32:10 +1100
|
||||||
Subject: [PATCH] Fire PreLogin Events in Offline Mode
|
Subject: [PATCH] Fire PreLogin Events in Offline Mode
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
index 50beec2..42905fd 100644
|
index 50beec2..9bfb5a2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
||||||
@@ -13,6 +13,7 @@ import java.util.Arrays;
|
@@ -13,6 +13,7 @@ import java.util.Arrays;
|
||||||
@ -40,13 +40,14 @@ index 50beec2..42905fd 100644
|
|||||||
|
|
||||||
// CraftBukkit start - fire PlayerLoginEvent
|
// CraftBukkit start - fire PlayerLoginEvent
|
||||||
EntityPlayer s = this.server.getPlayerList().attemptLogin(this, this.i, hostname);
|
EntityPlayer s = this.server.getPlayerList().attemptLogin(this, this.i, hostname);
|
||||||
@@ -133,7 +147,14 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
@@ -133,7 +147,15 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||||
this.g = LoginListener.EnumProtocolState.KEY;
|
this.g = LoginListener.EnumProtocolState.KEY;
|
||||||
this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.P().getPublic(), this.e));
|
this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.P().getPublic(), this.e));
|
||||||
} else {
|
} else {
|
||||||
- this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
- this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||||
+ // Spigot start
|
+ // Spigot start
|
||||||
+ try {
|
+ try {
|
||||||
|
+ initUUID();
|
||||||
+ new LoginHandler().fireEvents();
|
+ new LoginHandler().fireEvents();
|
||||||
+ } catch (Exception ex) {
|
+ } catch (Exception ex) {
|
||||||
+ disconnect("Failed to verify username!");
|
+ disconnect("Failed to verify username!");
|
||||||
@ -56,7 +57,7 @@ index 50beec2..42905fd 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -162,6 +183,40 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
@@ -162,6 +184,40 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +98,7 @@ index 50beec2..42905fd 100644
|
|||||||
String playerName = i.getName();
|
String playerName = i.getName();
|
||||||
java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress();
|
java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress();
|
||||||
java.util.UUID uniqueId = i.getId();
|
java.util.UUID uniqueId = i.getId();
|
||||||
@@ -196,34 +251,9 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
@@ -196,34 +252,9 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
LoginListener.c.info("UUID of player " + LoginListener.this.i.getName() + " is " + LoginListener.this.i.getId());
|
LoginListener.c.info("UUID of player " + LoginListener.this.i.getName() + " is " + LoginListener.this.i.getId());
|
||||||
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From f48c765fc57be686f7d779a91d68034027fc9d00 Mon Sep 17 00:00:00 2001
|
From 8847d9167368c6536609a0bfad76e1bd1b46613a Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Fri, 15 Aug 2014 00:56:41 -0400
|
Date: Fri, 15 Aug 2014 00:56:41 -0400
|
||||||
Subject: [PATCH] Fix Corrupted Trapped Chest
|
Subject: [PATCH] Fix Corrupted Trapped Chest
|
||||||
@ -9,10 +9,10 @@ If a Trapped Chest gets its Tile Entity corrupted, it will crash the server ever
|
|||||||
This will now fix Trapped Chests too.
|
This will now fix Trapped Chests too.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 6ed7078..18b7f7d 100644
|
index af4a551..6438c66 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -112,7 +112,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -113,7 +113,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
TileEntity result = super.getTileEntity(pos);
|
TileEntity result = super.getTileEntity(pos);
|
||||||
Block type = getType(pos).getBlock();
|
Block type = getType(pos).getBlock();
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 3adf7c50ac25727434bd3aea045dcad4b4ec8cf5 Mon Sep 17 00:00:00 2001
|
From aeedbb3daa60164b9ed25ee1d800a91d17a92ba4 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 20 Aug 2014 18:12:32 -0400
|
Date: Wed, 20 Aug 2014 18:12:32 -0400
|
||||||
Subject: [PATCH] Limit TNT Detonations per tick
|
Subject: [PATCH] Limit TNT Detonations per tick
|
||||||
@ -19,10 +19,10 @@ index 10f6e47..2d22327 100644
|
|||||||
this.lastY = this.locY;
|
this.lastY = this.locY;
|
||||||
this.lastZ = this.locZ;
|
this.lastZ = this.locZ;
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 18b7f7d..c820ee0 100644
|
index 6438c66..1b26492 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -581,6 +581,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -582,6 +582,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
super.tickEntities();
|
super.tickEntities();
|
||||||
|
Loading…
Reference in New Issue
Block a user