From b87177fe83fb930d322acbca9f9808bd07e93199 Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Tue, 16 Feb 2021 21:33:28 +0100 Subject: [PATCH] Update to latest ResourcePack --- .../invui/resourcepack/ForceResourcePack.java | 10 ++++++---- .../java/de/studiocode/invui/resourcepack/Icon.java | 11 ++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/studiocode/invui/resourcepack/ForceResourcePack.java b/src/main/java/de/studiocode/invui/resourcepack/ForceResourcePack.java index efc3cc3..39c4fbe 100644 --- a/src/main/java/de/studiocode/invui/resourcepack/ForceResourcePack.java +++ b/src/main/java/de/studiocode/invui/resourcepack/ForceResourcePack.java @@ -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 diff --git a/src/main/java/de/studiocode/invui/resourcepack/Icon.java b/src/main/java/de/studiocode/invui/resourcepack/Icon.java index 7699703..642288c 100644 --- a/src/main/java/de/studiocode/invui/resourcepack/Icon.java +++ b/src/main/java/de/studiocode/invui/resourcepack/Icon.java @@ -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;