Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
Fix the player's uuid being null in Bungee mode/offline mode
Dieser Commit ist enthalten in:
Ursprung
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>
|
||||
Date: Sat, 13 Dec 2014 12:59:14 +1100
|
||||
Subject: [PATCH] BungeeCord Chat API
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 7be35f3..91cecac 100644
|
||||
index 78f50bd..3e52a20 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -77,6 +77,14 @@
|
||||
@@ -82,6 +82,14 @@
|
||||
<version>1.14</version>
|
||||
<scope>compile</scope>
|
||||
</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>
|
||||
Date: Tue, 2 Jul 2013 13:07:39 +1000
|
||||
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.
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 7f49330..eb0128a 100644
|
||||
index 55e2603..1c4f56e 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,12 +1,12 @@
|
||||
@ -51,7 +51,7 @@ index 7f49330..eb0128a 100644
|
||||
<version>${project.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
@@ -93,21 +105,39 @@
|
||||
@@ -88,21 +100,39 @@
|
||||
|
||||
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
||||
<build>
|
||||
@ -94,7 +94,7 @@ index 7f49330..eb0128a 100644
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>gitdescribe</goal>
|
||||
@@ -124,7 +154,7 @@
|
||||
@@ -119,7 +149,7 @@
|
||||
<manifestEntries>
|
||||
<Main-Class>org.bukkit.craftbukkit.Main</Main-Class>
|
||||
<Implementation-Title>CraftBukkit</Implementation-Title>
|
||||
@ -103,7 +103,7 @@ index 7f49330..eb0128a 100644
|
||||
<Implementation-Vendor>Bukkit Team</Implementation-Vendor>
|
||||
<Specification-Title>Bukkit</Specification-Title>
|
||||
<Specification-Version>${api.version}</Specification-Version>
|
||||
@@ -169,7 +199,7 @@
|
||||
@@ -164,7 +194,7 @@
|
||||
<configuration>
|
||||
<signature>
|
||||
<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>
|
||||
Date: Tue, 11 Jun 2013 12:56:02 +1000
|
||||
Subject: [PATCH] Better Chunk Tick Selection
|
||||
@ -112,10 +112,10 @@ index 345ede9..bed457a 100644
|
||||
|
||||
this.methodProfiler.b();
|
||||
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
|
||||
+++ 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() {
|
||||
super.h();
|
||||
if (this.worldData.getType() == WorldType.DEBUG_ALL_BLOCK_STATES) {
|
||||
@ -134,7 +134,7 @@ index 32bf7ff..383a491 100644
|
||||
}
|
||||
|
||||
} 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();
|
||||
// int k = chunkcoordintpair1.x * 16;
|
||||
// int l = chunkcoordintpair1.z * 16;
|
||||
@ -159,7 +159,7 @@ index 32bf7ff..383a491 100644
|
||||
int k = chunkX * 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>
|
||||
Date: Sat, 23 Mar 2013 09:52:41 +1100
|
||||
Subject: [PATCH] View Distance
|
||||
@ -22,10 +22,10 @@ index 688d6f0..abb24c8 100644
|
||||
|
||||
public WorldServer a() {
|
||||
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
|
||||
+++ 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
|
||||
this.server = minecraftserver;
|
||||
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>
|
||||
Date: Thu, 10 Jan 2013 00:18:11 -0500
|
||||
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
|
||||
index a3c3c78..6ed7078 100644
|
||||
index 08b21a5..af4a551 100644
|
||||
--- a/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
|
||||
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)) {
|
||||
@ -547,7 +547,7 @@ index a3c3c78..6ed7078 100644
|
||||
this.methodProfiler.c("chunkSource");
|
||||
this.chunkProvider.unloadChunks();
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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>
|
||||
Date: Wed, 18 Dec 2013 13:32:10 +1100
|
||||
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
|
||||
index 50beec2..42905fd 100644
|
||||
index 50beec2..9bfb5a2 100644
|
||||
--- a/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;
|
||||
@ -40,13 +40,14 @@ index 50beec2..42905fd 100644
|
||||
|
||||
// CraftBukkit start - fire PlayerLoginEvent
|
||||
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.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.P().getPublic(), this.e));
|
||||
} else {
|
||||
- this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||
+ // Spigot start
|
||||
+ try {
|
||||
+ initUUID();
|
||||
+ new LoginHandler().fireEvents();
|
||||
+ } catch (Exception ex) {
|
||||
+ 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;
|
||||
}
|
||||
|
||||
@ -97,7 +98,7 @@ index 50beec2..42905fd 100644
|
||||
String playerName = i.getName();
|
||||
java.net.InetAddress address = ((java.net.InetSocketAddress) networkManager.getSocketAddress()).getAddress();
|
||||
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
|
||||
LoginListener.c.info("UUID of player " + LoginListener.this.i.getName() + " is " + LoginListener.this.i.getId());
|
||||
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>
|
||||
Date: Fri, 15 Aug 2014 00:56:41 -0400
|
||||
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.
|
||||
|
||||
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
|
||||
+++ 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);
|
||||
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>
|
||||
Date: Wed, 20 Aug 2014 18:12:32 -0400
|
||||
Subject: [PATCH] Limit TNT Detonations per tick
|
||||
@ -19,10 +19,10 @@ index 10f6e47..2d22327 100644
|
||||
this.lastY = this.locY;
|
||||
this.lastZ = this.locZ;
|
||||
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
|
||||
+++ 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();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren