Fix for null player name.
WTF? I guess in Cauldron, an offline player can have a null name.
This commit is contained in:
1 parent
5ebd570fdf
commit
6591933ad8
1 file changed
+1
-1
@@ -2204,7 +2204,7 @@ public class GriefPrevention extends JavaPlugin
|
|||||||
OfflinePlayer [] players = this.getServer().getOfflinePlayers();
|
OfflinePlayer [] players = this.getServer().getOfflinePlayers();
|
||||||
for(int i = 0; i < players.length; i++)
|
for(int i = 0; i < players.length; i++)
|
||||||
{
|
{
|
||||||
if(players[i].getName().equalsIgnoreCase(name))
|
if(players[i].getName() != null && players[i].getName().equalsIgnoreCase(name))
|
||||||
{
|
{
|
||||||
bestMatch = players[i];
|
bestMatch = players[i];
|
||||||
if(bestMatch.getName().equals(name)) return bestMatch;
|
if(bestMatch.getName().equals(name)) return bestMatch;
|
||||||
|
|||||||
Reference in new issue
Block a user