Use UUIDs to store levels

This commit is contained in:
koooh committed 2016-11-13 23:36:35 +01:00
1 parent e0cefc9ab4
commit 2e1fc45dc4
5 files changed
+138 -90

No files matched your search

@@ -57,7 +57,7 @@ public class User {
*/
public User(UUID uuid) {
this.uuid = uuid;
this.name = getPlayer().getName();
this.name = getPlayer() != null && getPlayer().isOnline() ? getPlayer().getName() : "";
this.id = getPlayer() != null && getPlayer().isOnline() ? getPlayer().getEntityId() : -1;
}
@@ -105,7 +105,7 @@ public class User {
* @return Player
*/
public Player getPlayer() {
return Bukkit.getPlayer(uuid);
return Bukkit.getPlayer(uuid);
}
/**