2014-04-15 02:03:38 +00:00
|
|
|
From a416b1a77ca43eae714a6b088167e31f9ba6d750 Mon Sep 17 00:00:00 2001
|
2014-04-14 07:22:57 +00:00
|
|
|
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
|
2014-04-15 02:03:38 +00:00
|
|
|
index 4920956..50a783e 100644
|
2014-04-14 07:22:57 +00:00
|
|
|
--- 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 {
|
|
|
|
|
|
|
|
public OfflinePlayer getOfflinePlayer(String name) {
|
|
|
|
Validate.notNull(name, "Name cannot be null");
|
|
|
|
+ com.google.common.base.Preconditions.checkArgument( !org.apache.commons.lang.StringUtils.isBlank( name ), "Name cannot be blank" ); // Spigot
|
|
|
|
|
|
|
|
OfflinePlayer result = getPlayerExact(name);
|
|
|
|
if (result == null) {
|
|
|
|
--
|
|
|
|
1.8.3.2
|
|
|
|
|