Fixed NPE during login.
Not sure how a player could NOT have an IP address at this point? But logs from customers show it happens somehow.
This commit is contained in:
1 parent
1c7f132472
commit
02dee1f21e
1 file changed
+3
@@ -689,6 +689,8 @@ class PlayerEventHandler implements Listener
|
|||||||
|
|
||||||
//ensure we're not over the limit for this IP address
|
//ensure we're not over the limit for this IP address
|
||||||
InetAddress ipAddress = playerData.ipAddress;
|
InetAddress ipAddress = playerData.ipAddress;
|
||||||
|
if(ipAddress != null)
|
||||||
|
{
|
||||||
String ipAddressString = ipAddress.toString();
|
String ipAddressString = ipAddress.toString();
|
||||||
int ipLimit = GriefPrevention.instance.config_ipLimit;
|
int ipLimit = GriefPrevention.instance.config_ipLimit;
|
||||||
if(ipLimit > 0 && !player.hasAchievement(Achievement.MINE_WOOD))
|
if(ipLimit > 0 && !player.hasAchievement(Achievement.MINE_WOOD))
|
||||||
@@ -711,6 +713,7 @@ class PlayerEventHandler implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//when a player spawns, conditionally apply temporary pvp protection
|
//when a player spawns, conditionally apply temporary pvp protection
|
||||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
|
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
|
||||||
|
|||||||
Reference in new issue
Block a user