Remove whitelist fix patch, pulled upstream & also slightly incorrect, userCache.a() does not perform a full lookup.

This commit is contained in:
md_5 2014-04-15 12:03:38 +10:00
parent f2d99a6bf3
commit 10a61a9d08
14 changed files with 16 additions and 56 deletions

View File

@ -1,40 +0,0 @@
From 39524f0f91c9945265786856e1f6935a110cd601 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sat, 12 Apr 2014 17:17:10 +1000
Subject: [PATCH] Address Serious Issues with Offline Players
Such as name being entirely unresolved! This fixes the whitelist command and no doubt lots more.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
index bd98822..7af54cf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
@@ -48,6 +48,12 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
if (player != null) {
return player.getName();
}
+ // Spigot Start
+ if ( profile != null )
+ {
+ return profile.getName();
+ }
+ // Spigot End
// This might not match lastKnownName but if not it should be more correct
if (profile.getName() != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 4920956..c30197b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1330,7 +1330,7 @@ public final class CraftServer implements Server {
if (result == null) {
result = offlinePlayers.get(id);
if (result == null) {
- result = new CraftOfflinePlayer(this, new GameProfile(id, null));
+ result = new CraftOfflinePlayer(this, MinecraftServer.getServer().getUserCache().a(id)); // Spigot - this is blocking, but we have no choice!
offlinePlayers.put(id, result);
}
} else {
--
1.8.3.2

View File

@ -1,11 +1,11 @@
From 228199fe9665874aa57419b93cbf01db68f9f1f5 Mon Sep 17 00:00:00 2001
From b007a5c351d2f1ee7929b86241020ab4b5a483fe Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sat, 12 Apr 2014 21:23:58 +1000
Subject: [PATCH] Treat Bungee as Online Mode
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 01dedf2..035e6cb 100644
index 45561e9..f218a59 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -56,7 +56,7 @@ public class NameReferencingFileConverter {

View File

@ -1,4 +1,4 @@
From 21f4c01b12101d1c3a1447908d48997f08939949 Mon Sep 17 00:00:00 2001
From 6ef2e1e42b3f9cb632d28c92fe22ff507f361374 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sat, 12 Apr 2014 17:49:14 +1000
Subject: [PATCH] Fix several occurances of missed diff.

View File

@ -1,4 +1,4 @@
From 0898259a3967f6df388bbb7bf00b304b9275bdf9 Mon Sep 17 00:00:00 2001
From 7f21cf38dd9bdd817558af943078eaf7377850ca Mon Sep 17 00:00:00 2001
From: myiume <cursed_kidd@yahoo.com>
Date: Wed, 19 Feb 2014 15:40:37 +0200
Subject: [PATCH] Fix PlayerFishEvent not properly cancelling. Fixes

View File

@ -1,4 +1,4 @@
From e52a1d8a82cbe657525ec95b25dff3ce1c660079 Mon Sep 17 00:00:00 2001
From 4bf69ab03aa8a2ccd26342e71dbf9d81df55fd4f Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sat, 12 Apr 2014 21:37:12 +1000
Subject: [PATCH] Update Warning

View File

@ -1,4 +1,4 @@
From 930afb9aea43096aee680e9dab2c9eb574d82bb5 Mon Sep 17 00:00:00 2001
From 97d07d8cb04d693b475287e2cd19b149018c3bb7 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sat, 12 Apr 2014 23:30:44 +1000
Subject: [PATCH] Add Conversion Message

View File

@ -1,4 +1,4 @@
From 4ab067a30f5e6830ee19ed239cdecd5c875907bb Mon Sep 17 00:00:00 2001
From aa1660824dc92b879d8fa657812cbf2726209936 Mon Sep 17 00:00:00 2001
From: "gjmcferrin@gmail.com" <gjmcferrin@gmail.com>
Date: Mon, 10 Feb 2014 10:05:11 -0500
Subject: [PATCH] Properly cancel fishing event. Fixes BUKKIT-5396

View File

@ -1,4 +1,4 @@
From 4a54acd0c4fcf31b83a4b9ee83b7dfb78be93b0d Mon Sep 17 00:00:00 2001
From 3156688e2c385be10ce1971474b4378c4e3e5d0f Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sun, 13 Apr 2014 09:00:59 +1000
Subject: [PATCH] Print Stack on InternalException

View File

@ -1,4 +1,4 @@
From e34c2596ef1fe7a757e670196b95dc3daf4ab28b Mon Sep 17 00:00:00 2001
From 6537fd25ac26a4c88355e62671a8ad2a906f0384 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sun, 13 Apr 2014 14:41:23 +1000
Subject: [PATCH] Use Offline Player Data Once if Required.
@ -6,7 +6,7 @@ Subject: [PATCH] Use Offline Player Data Once if Required.
If we are online mode and the only copy of player data we can find is the player's offline mode data, we will attempt a once off conversion by reading this data and then renaming the file so it won't be used again.
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
index fabc72b..89ba461 100644
index 93ff8d3..cc4d487 100644
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -196,10 +196,28 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {

View File

@ -1,4 +1,4 @@
From 52ddbd12db29790dd2c0551f4a0e53c6b1d5af27 Mon Sep 17 00:00:00 2001
From a3c7ac25e8844684bae259cefbbedb721ae7ce32 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Mon, 14 Apr 2014 09:46:20 +1000
Subject: [PATCH] Use Provided Case for Non Existent Offline Players

View File

@ -1,4 +1,4 @@
From c4611db9d7d06723ded37a11c24a808e04c1ef6f Mon Sep 17 00:00:00 2001
From 5452cbaf8ee7a06a0796abdab9479e5adbcdb935 Mon Sep 17 00:00:00 2001
From: Devin Ryan <devin@forairan.com>
Date: Mon, 14 Apr 2014 11:33:48 +1000
Subject: [PATCH] Prevent crash from a ConversationTracker exception.

View File

@ -1,11 +1,11 @@
From ffc8031afadcab95da7bf7991fa4903265de4e77 Mon Sep 17 00:00:00 2001
From a416b1a77ca43eae714a6b088167e31f9ba6d750 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Mon, 14 Apr 2014 17:21:24 +1000
Subject: [PATCH] Check for blank OfflinePlayer Names
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c30197b..9f0517b 100644
index 4920956..50a783e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1304,6 +1304,7 @@ public final class CraftServer implements Server {

View File

@ -1,4 +1,4 @@
From 5bcd3aaed63f03a3476f8dbeb0011c521d533b5c Mon Sep 17 00:00:00 2001
From 1bee53e1e4ffe5a043427ec9d9a45d9373378155 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Tue, 15 Apr 2014 10:32:48 +1000
Subject: [PATCH] Fix Player Banning

View File

@ -1,4 +1,4 @@
From 0cd2a0d0956c136725d42c565bc7d99d35387ea9 Mon Sep 17 00:00:00 2001
From 7543edf708c1007c3d7501ba48b08c9a7d7ad9cd Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Tue, 15 Apr 2014 10:48:35 +1000
Subject: [PATCH] Check Skull canPlace