From c4efd3fe8f6cc05658224a7c363c3296af8b6c19 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 15 Jan 2014 23:14:21 +1300 Subject: [PATCH] Don't crash when a empty string is fed for player disguise --- src/me/libraryaddict/disguise/utilities/ReflectionManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/utilities/ReflectionManager.java b/src/me/libraryaddict/disguise/utilities/ReflectionManager.java index dca767c4..dccb996e 100644 --- a/src/me/libraryaddict/disguise/utilities/ReflectionManager.java +++ b/src/me/libraryaddict/disguise/utilities/ReflectionManager.java @@ -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(); }