Require player to be both online AND not null instead of OR

This commit is contained in:
h31ix committed 2012-12-17 15:30:45 -05:00
1 parent 32a762298f
commit 1999b4a4f4
1 file changed
+8 -8
@@ -73,7 +73,7 @@ public class User
public boolean increaseLevel(CheckType type)
{
if(getPlayer() != null || getPlayer().isOnline())
if(getPlayer() != null && getPlayer().isOnline())
{
if(silentMode && type.getUses(name) % 4 != 0)
{
@@ -123,34 +123,34 @@ public class User
type.clearUse(name);
}
}
public Location getGoodLocation(Location e)
public Location getGoodLocation(Location e)
{
if(goodLocation == null)
{
return e;
}
return goodLocation;
}
public boolean hasGoodLocation()
{
return goodLocation != null;
}
public void setGoodLocation(Location e)
{
if(Utilities.cantStandAtExp(e))
{
return;
}
if(e.getBlock().isLiquid() && !Utilities.isFullyInWater(e))
{
return;
}
goodLocation = e;
}