From 50db674b7d32d2c3bfbcf04850acd3a100cabe0e Mon Sep 17 00:00:00 2001 From: Gravit Date: Mon, 19 Aug 2019 13:09:26 +0700 Subject: [PATCH] =?UTF-8?q?Revert=20"[FIX]=20=D0=A3=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D1=8C=20=D0=B2=20GameProfile=20=D0=BE=D1=82=20Apac?= =?UTF-8?q?he=20Common=20Lang3"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mojang/authlib/GameProfile.java | 86 ------------------- 1 file changed, 86 deletions(-) delete mode 100644 LauncherAuthlib/src/main/java/com/mojang/authlib/GameProfile.java diff --git a/LauncherAuthlib/src/main/java/com/mojang/authlib/GameProfile.java b/LauncherAuthlib/src/main/java/com/mojang/authlib/GameProfile.java deleted file mode 100644 index cc195f3e..00000000 --- a/LauncherAuthlib/src/main/java/com/mojang/authlib/GameProfile.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.mojang.authlib; - -import com.mojang.authlib.properties.PropertyMap; -import java.util.UUID; - -public class GameProfile { - private final UUID id; - private final String name; - private final PropertyMap properties = new PropertyMap(); - private boolean legacy; - - public GameProfile(UUID id, String name) { - if (id == null && isBlank(name)) { - throw new IllegalArgumentException("Name and ID cannot both be blank"); - } else { - this.id = id; - this.name = name; - } - } - - public UUID getUUID() { - return this.id; - } - - public String getName() { - return this.name; - } - - public PropertyMap getProperties() { - return this.properties; - } - - public boolean isComplete() { - return this.id != null && isNotBlank(this.getName()); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } else if (o != null && this.getClass() == o.getClass()) { - GameProfile that = (GameProfile)o; - if (this.id != null) { - if (!this.id.equals(that.id)) { - return false; - } - } else if (that.id != null) { - return false; - } - - if (this.name != null) { - return this.name.equals(that.name); - } else return that.name == null; - - } else { - return false; - } - } - - public int hashCode() { - int result = this.id != null ? this.id.hashCode() : 0; - result = 31 * result + (this.name != null ? this.name.hashCode() : 0); - return result; - } - - @Override - public String toString() { - return "GameProfile{" + - "id=" + id + - ", name='" + name + '\'' + - ", properties=" + properties + - ", legacy=" + legacy + - '}'; - } - - public boolean isLegacy() { - return this.legacy; - } - - private static boolean isBlank(String s) { - return s == null || s.chars().allMatch(Character::isWhitespace); - } - - private static boolean isNotBlank(String s) { - return !isBlank(s); - } -} \ No newline at end of file