mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-16 15:38:14 +01:00
Don't crash when a empty string is fed for player disguise
This commit is contained in:
parent
c1374e8523
commit
c4efd3fe8f
@ -3,6 +3,7 @@ package me.libraryaddict.disguise.utilities;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Art;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -193,7 +194,7 @@ public class ReflectionManager {
|
||||
public static Object getGameProfile(String playerName) {
|
||||
try {
|
||||
return Class.forName("net.minecraft.util.com.mojang.authlib.GameProfile").getConstructor(String.class, String.class)
|
||||
.newInstance(playerName, playerName);
|
||||
.newInstance(UUID.randomUUID().toString(), "a");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user