Fixed a potential crash with trails

This commit is contained in:
Adubbz 2016-04-05 11:19:15 +10:00
parent ff45984c2d
commit 2c08dc3c5b

View file

@ -37,7 +37,7 @@ public class TrailsEventHandler
EntityPlayer player = (EntityPlayer)event.player; EntityPlayer player = (EntityPlayer)event.player;
//Check if the player has a trail //Check if the player has a trail
if (TrailManager.trailsMap.containsKey(player.getUniqueID())) if (minecraft.thePlayer != null && TrailManager.trailsMap.containsKey(player.getUniqueID()))
{ {
//Don't display if the local player's trail if they have the visibility set to others //Don't display if the local player's trail if they have the visibility set to others
if (MiscConfigurationHandler.trailVisbilityMode == TrailVisibilityMode.OTHERS && minecraft.thePlayer.getUniqueID() == player.getUniqueID()) if (MiscConfigurationHandler.trailVisbilityMode == TrailVisibilityMode.OTHERS && minecraft.thePlayer.getUniqueID() == player.getUniqueID())