Fix wrong UUID version comparison logic

This commit is contained in:
Phoenix616 2019-05-07 23:48:04 +01:00
parent a95f7316d6
commit ca94031ddf

View File

@ -55,7 +55,7 @@ public class NameManager implements Listener {
public static Account getOrCreateAccount(OfflinePlayer player) { public static Account getOrCreateAccount(OfflinePlayer player) {
Validate.notNull(player.getName(), "Name of player is null?"); Validate.notNull(player.getName(), "Name of player is null?");
Validate.notNull(player.getUniqueId(), "UUID of player is null?"); Validate.notNull(player.getUniqueId(), "UUID of player is null?");
Validate.isTrue(player.getUniqueId().version() != uuidVersion, "Invalid OfflinePlayer! " + player.getUniqueId() + " is not of server version " + uuidVersion); Validate.isTrue(player.getUniqueId().version() == uuidVersion, "Invalid OfflinePlayer! " + player.getUniqueId() + " is not of server version " + uuidVersion);
Account account = getAccount(player.getUniqueId()); Account account = getAccount(player.getUniqueId());
if (account == null) { if (account == null) {