-
Notifications
You must be signed in to change notification settings - Fork 113
issue with setResourcePack for the second time. #408
Copy link
Copy link
Open
Description
Expected behavior
When I try to do setResourcePack a second time it works successfully
Observed/Actual behavior
When I set the resource pack for a player for the first time, everything works correctly. However, when I try to apply the another resource pack for the player a second time, it does not happen, and I do not receive any errors
Steps/models to reproduce
public class ResourcePackManager {
private static final String FIRST_RESOURCE_PACK_URL = "http://test.com/a.zip";
private static final String SECOND_RESOURCE_PACK_URL = "http://test.com/b.zip";
private static final String HASH_KEY = "hash_key"; // Example hash key, replace with actual
// Method to send the resource packs
public static void sendResourcePacks(JavaPlugin plugin, Player player) {
// Send the first resource pack
player.setResourcePack(FIRST_RESOURCE_PACK_URL, HASH_KEY);
// Schedule a task to send the second resource pack after 1 minute
new BukkitRunnable() {
@Override
public void run() {
player.setResourcePack(SECOND_RESOURCE_PACK_URL, HASH_KEY);
}
}.runTaskLater(plugin, 20L * 60); // 20 ticks * 60 seconds = 1 minute
}
}
Plugin and Datapack List
my ResourcePackManager
MultiPaper version
on latest version
79b6271
Other
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels