Should fix fakePlayer lookup NPE #546
I think it's safe to say that if the player is null here, the places we use this check should probably not continue. Will see how it goes. Also added the check to imperfect rituals and removed a redundant check from the dagger.
This commit is contained in:
parent
9aac50542b
commit
5ac78b2dea
3 changed files with 4 additions and 4 deletions
|
@ -68,7 +68,7 @@ public class PlayerHelper
|
|||
|
||||
public static boolean isFakePlayer(EntityPlayer player)
|
||||
{
|
||||
return player instanceof FakePlayer || FAKE_PLAYER_PATTERN.matcher(getUsernameFromPlayer(player)).matches();
|
||||
return player != null && player instanceof FakePlayer || FAKE_PLAYER_PATTERN.matcher(getUsernameFromPlayer(player)).matches();
|
||||
}
|
||||
|
||||
public static void causeNauseaToPlayer(ItemStack stack)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue