Update to latest ResourcePack

This commit is contained in:
NichtStudioCode 2021-02-16 21:33:28 +01:00
parent 5e27d272db
commit b87177fe83
2 changed files with 14 additions and 7 deletions

@ -20,17 +20,19 @@ import static org.bukkit.event.player.PlayerResourcePackStatusEvent.Status.DECLI
*/
public class ForceResourcePack implements Listener {
private static final String RP_VERSION = "v0.7";
/**
* A resource pack with all the {@link Icon}s
*/
public static final String LIGHT_RESOURCE_PACK_URL =
"https://github.com/NichtStudioCode/InvUIRP/releases/download/v0.6-light/InvUIRP.zip";
"https://github.com/NichtStudioCode/InvUIRP/releases/download/" + RP_VERSION + "-light/InvUIRP.zip";
/**
* A resource pack that also provides all {@link MaterialIcon}s
*/
public static final String FULL_RESOURCE_PACK_URL =
"https://github.com/NichtStudioCode/InvUIRP/releases/download/v0.6/InvUIRP.zip";
public static final String COMPLETE_RESOURCE_PACK_URL =
"https://github.com/NichtStudioCode/InvUIRP/releases/download/" + RP_VERSION + "/InvUIRP.zip";
private static final ForceResourcePack INSTANCE = new ForceResourcePack();
@ -69,7 +71,7 @@ public class ForceResourcePack implements Listener {
private void sendResourcePack(Player player) {
player.setResourcePack(resourcePackUrl);
tasks.put(player, Bukkit.getScheduler().runTaskLater(InvUI.getInstance().getPlugin(),
() -> kickPlayer(player), 20 * 5));
() -> kickPlayer(player), 20 * 5));
}
@EventHandler

@ -9,8 +9,9 @@ import java.util.HashMap;
/**
* Custom-textured Items that look like they are a part of the inventory.
* Needs the resource pack to work, activate ResourcePack forcing
* via {@link ForceResourcePack#setActivated(boolean)}.
* Needs the resource pack to work, activate ResourcePack forcing and
* choose between the lightweight or complete version using
* {@link ForceResourcePack#setResourcePackUrl(String)}.
*/
public enum Icon {
@ -75,7 +76,11 @@ public enum Icon {
CIRCLE(10000058),
LIGHT_CIRCLE(10000059),
BOX(10000060),
LIGHT_BOX(10000061);
LIGHT_BOX(10000061),
REFRESH(10000062),
LIGHT_REFRESH(10000063),
REFRESH_ANIMATED(10000064),
LIGHT_REFRESH_ANIMATED(10000065);
private final ItemBuilder itemBuilder;
private final Item item;