forked from Upstream/CommandPanels
3.19.1.0
This commit is contained in:
parent
d43fcfa1b1
commit
3d24f93d84
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user