mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
Require player to be both online AND not null instead of OR
This commit is contained in:
1 parent
32a762298f
commit
1999b4a4f4
1 file changed
+8
-8
@@ -73,7 +73,7 @@ public class User
|
|||||||
|
|
||||||
public boolean increaseLevel(CheckType type)
|
public boolean increaseLevel(CheckType type)
|
||||||
{
|
{
|
||||||
if(getPlayer() != null || getPlayer().isOnline())
|
if(getPlayer() != null && getPlayer().isOnline())
|
||||||
{
|
{
|
||||||
if(silentMode && type.getUses(name) % 4 != 0)
|
if(silentMode && type.getUses(name) % 4 != 0)
|
||||||
{
|
{
|
||||||
@@ -123,34 +123,34 @@ public class User
|
|||||||
type.clearUse(name);
|
type.clearUse(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Location getGoodLocation(Location e)
|
public Location getGoodLocation(Location e)
|
||||||
{
|
{
|
||||||
if(goodLocation == null)
|
if(goodLocation == null)
|
||||||
{
|
{
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
return goodLocation;
|
return goodLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasGoodLocation()
|
public boolean hasGoodLocation()
|
||||||
{
|
{
|
||||||
return goodLocation != null;
|
return goodLocation != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGoodLocation(Location e)
|
public void setGoodLocation(Location e)
|
||||||
{
|
{
|
||||||
if(Utilities.cantStandAtExp(e))
|
if(Utilities.cantStandAtExp(e))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(e.getBlock().isLiquid() && !Utilities.isFullyInWater(e))
|
if(e.getBlock().isLiquid() && !Utilities.isFullyInWater(e))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
goodLocation = e;
|
goodLocation = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user