This commit is contained in:
nossr50 2019-04-14 05:39:23 -07:00
parent 0f8c0f97d9
commit 31c1bd52bc
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.gmail.nossr50.mcMMO</groupId>
<artifactId>mcMMO</artifactId>
<version>2.1.44-SNAPSHOT</version>
<version>2.1.44</version>
<name>mcMMO</name>
<url>https://github.com/mcMMO-Dev/mcMMO</url>
<scm>

View File

@ -103,7 +103,7 @@ public final class UserManager {
*/
public static McMMOPlayer getPlayer(Player player) {
//Avoid Array Index out of bounds
if(player.hasMetadata(mcMMO.playerDataKey))
if(player != null && player.hasMetadata(mcMMO.playerDataKey))
return (McMMOPlayer) player.getMetadata(mcMMO.playerDataKey).get(0).value();
else
return null;