Fix for null player name.
WTF? I guess in Cauldron, an offline player can have a null name.
This commit is contained in:
parent
5ebd570fdf
commit
6591933ad8
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user