mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
New method for instantiating User objects
This commit is contained in:
1 parent
8d8420541d
commit
9fd3a0988d
3 files changed
+14
-9
No files matched your search
@@ -21,11 +21,16 @@ public class User {
|
||||
* @param uuid Minecraft account {@link UUID} of the player
|
||||
* @param username Username of the player
|
||||
*/
|
||||
public User(@NotNull UUID uuid, @NotNull String username) {
|
||||
protected User(@NotNull UUID uuid, @NotNull String username) {
|
||||
this.uuid = uuid;
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static User of(@NotNull UUID uuid, @NotNull String username) {
|
||||
return new User(uuid, username);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@NotNull Object obj) {
|
||||
if (obj instanceof User user) {
|
||||
|
||||
Reference in new issue
Block a user