diff --git a/gradle.properties b/gradle.properties index 384e40f..50bba12 100644 --- a/gradle.properties +++ b/gradle.properties @@ -53,7 +53,7 @@ mod_name=Zontreck Library Mod # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=GPLv3 # The mod version. See https://semver.org/ -mod_version=1.10.011524.0036 +mod_version=1.10.011524.0045 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUIButton.java b/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUIButton.java index 45afc5a..4368831 100644 --- a/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUIButton.java +++ b/src/main/java/dev/zontreck/libzontreck/chestgui/ChestGUIButton.java @@ -162,7 +162,7 @@ public class ChestGUIButton */ public void clicked() { - if(Instant.now().getEpochSecond() > (lastInvoked + 3)) + if(Instant.now().getEpochSecond() > (lastInvoked + 1)) { lastInvoked = Instant.now().getEpochSecond(); diff --git a/src/main/java/dev/zontreck/libzontreck/dynamicchest/ChestGUIReadOnlyStackHandler.java b/src/main/java/dev/zontreck/libzontreck/dynamicchest/ChestGUIReadOnlyStackHandler.java index 72adbd0..a83577e 100644 --- a/src/main/java/dev/zontreck/libzontreck/dynamicchest/ChestGUIReadOnlyStackHandler.java +++ b/src/main/java/dev/zontreck/libzontreck/dynamicchest/ChestGUIReadOnlyStackHandler.java @@ -15,21 +15,6 @@ public class ChestGUIReadOnlyStackHandler extends ItemStackHandler { private ChestGUI gui; private Player player; - private long lastClickTime; - private int lastClickStack=-1; - - public boolean validClick(int slot) - { - if(lastClickStack != slot)return true; - else{ - if(Instant.now().getEpochSecond() > (lastClickTime + 3)) - { - return true; - } - } - - return false; - } public ChestGUIReadOnlyStackHandler(ChestGUI gui, Player player) { @@ -90,13 +75,7 @@ public class ChestGUIReadOnlyStackHandler extends ItemStackHandler if(btn == null) return ItemStack.EMPTY; - if(validClick(slot)) - { - btn.clicked(); - - lastClickTime = Instant.now().getEpochSecond(); - lastClickStack = slot; - } + btn.clicked(); return ItemStack.EMPTY; }