Raxen/src/main/java/me/unurled/raxen/components/resourcepack/ResourcePack.java
unurled b24ddfba27 gq to me
change of domain name
2022-06-09 23:27:04 +02:00

31 lines
978 B
Java

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);
}
}