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 com.mojang.authlib.properties.PropertyMap;
|
||||||
import me.rockyhawk.commandpanels.CommandPanels;
|
import me.rockyhawk.commandpanels.CommandPanels;
|
||||||
import me.rockyhawk.commandpanels.ioclasses.legacy.MinecraftVersions;
|
import me.rockyhawk.commandpanels.ioclasses.legacy.MinecraftVersions;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
@ -68,6 +69,13 @@ public class GetCustomHeads {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
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
|
// Fetch the player UUID from the Mojang API
|
||||||
URL uuidUrl = new URL("https://api.mojang.com/users/profiles/minecraft/" + name);
|
URL uuidUrl = new URL("https://api.mojang.com/users/profiles/minecraft/" + name);
|
||||||
URLConnection uuidConnection = uuidUrl.openConnection();
|
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(){
|
new BukkitRunnable(){
|
||||||
int c = 0;
|
int c = 0;
|
||||||
int animatecount = 0;
|
int animatecount = 0;
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
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
|
//counter counts to refresh delay (in seconds) then restarts
|
||||||
if(c < refreshDelay){
|
if(c < refreshDelay){
|
||||||
c+=1;
|
c+=1;
|
||||||
|
Loading…
Reference in New Issue
Block a user