package me.unurled.raxen.components.resourcepack; import me.unurled.raxen.Raxen; import me.unurled.raxen.manager.server.ResourcePackManager; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; public class ResourcePack { private Raxen main; private FileConfiguration config; private ResourcePackManager resourcePackManager; public ResourcePack(Raxen main, ResourcePackManager manager) { this.main = main; this.config = main.getConfig(); this.resourcePackManager = manager; } public void join(Player player) { new BukkitRunnable() { @Override public void run() { if(resourcePackManager.isUseRP()) { player.setResourcePack(config.getString("ressource_pack_url"), config.getString("resource_pack_sha1")); } } }.runTaskLater(main, 2L); } }