mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Update for 1.6.4, add ProtocolLib softdepend. More on this later.
This commit is contained in:
1 parent
48d661c8ab
commit
1b9b5ef520
7 files changed
+90
-14
No files matched your search
@@ -33,6 +33,7 @@ import java.util.*;
|
||||
|
||||
public class User {
|
||||
private final String name;
|
||||
private final int id;
|
||||
private int level = 0;
|
||||
private Location goodLocation;
|
||||
private List<ItemStack> inventorySnapshot = null;
|
||||
@@ -59,6 +60,7 @@ public class User {
|
||||
public User(String name, int level) {
|
||||
this.name = name;
|
||||
this.level = level;
|
||||
this.id = getPlayer().getEntityId();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -70,6 +72,15 @@ public class User {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the player's entity ID
|
||||
*
|
||||
* @return Entity id
|
||||
*/
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Bukkit player
|
||||
*
|
||||
@@ -164,7 +175,7 @@ public class User {
|
||||
if (goodLocation == null) {
|
||||
return location;
|
||||
}
|
||||
|
||||
|
||||
return goodLocation;
|
||||
}
|
||||
|
||||
@@ -178,7 +189,7 @@ public class User {
|
||||
if (Utilities.cantStandAtExp(location) || (location.getBlock().isLiquid() && !Utilities.isFullyInWater(location))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
goodLocation = location;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user