diff --git a/src/me/rockyhawk/commandpanels/classresources/GetCustomHeads.java b/src/me/rockyhawk/commandpanels/classresources/GetCustomHeads.java index f0f2e43..1ceb9c6 100644 --- a/src/me/rockyhawk/commandpanels/classresources/GetCustomHeads.java +++ b/src/me/rockyhawk/commandpanels/classresources/GetCustomHeads.java @@ -5,6 +5,7 @@ import com.mojang.authlib.properties.Property; import com.mojang.authlib.properties.PropertyMap; import me.rockyhawk.commandpanels.CommandPanels; import me.rockyhawk.commandpanels.ioclasses.legacy.MinecraftVersions; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; @@ -68,6 +69,13 @@ public class GetCustomHeads { } try { + //send debug message + if(plugin.debug.consoleDebug){ + plugin.getServer().getConsoleSender().sendMessage(plugin.tex.colour(plugin.tag + + ChatColor.WHITE + + "Attempting to Download & Cache Head Texture for " + name)); + } + // Fetch the player UUID from the Mojang API URL uuidUrl = new URL("https://api.mojang.com/users/profiles/minecraft/" + name); URLConnection uuidConnection = uuidUrl.openConnection(); diff --git a/src/me/rockyhawk/commandpanels/interactives/Commandpanelrefresher.java b/src/me/rockyhawk/commandpanels/interactives/Commandpanelrefresher.java index b2e40d7..6beb5da 100644 --- a/src/me/rockyhawk/commandpanels/interactives/Commandpanelrefresher.java +++ b/src/me/rockyhawk/commandpanels/interactives/Commandpanelrefresher.java @@ -52,15 +52,18 @@ public class Commandpanelrefresher implements Listener { } } + //calculate the animate value if there is a custom value in the panel + int animatevaluetemp = -1; + if(pn.getConfig().contains("animatevalue")){ + animatevaluetemp = Integer.parseInt(pn.getConfig().getString("animatevalue")); + } + final int animatevalue = animatevaluetemp; + new BukkitRunnable(){ int c = 0; int animatecount = 0; @Override public void run() { - int animatevalue = -1; - if(pn.getConfig().contains("animatevalue")){ - animatevalue = Integer.parseInt(pn.getConfig().getString("animatevalue")); - } //counter counts to refresh delay (in seconds) then restarts if(c < refreshDelay){ c+=1;