diff --git a/build.gradle.kts b/build.gradle.kts index 130b475..7414b19 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,6 @@ allprojects { group = "io.github.liquip" - version = "2.0.1-beta" + version = "2.0.2-beta" repositories { mavenCentral() diff --git a/paper-standalone/src/main/java/io/github/liquip/paper/standalone/config/ConfigLoader.java b/paper-standalone/src/main/java/io/github/liquip/paper/standalone/config/ConfigLoader.java index 7af7515..6642509 100644 --- a/paper-standalone/src/main/java/io/github/liquip/paper/standalone/config/ConfigLoader.java +++ b/paper-standalone/src/main/java/io/github/liquip/paper/standalone/config/ConfigLoader.java @@ -30,6 +30,7 @@ import org.bukkit.NamespacedKey; import org.bukkit.Registry; import org.bukkit.Tag; +import org.bukkit.event.inventory.InventoryType; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.RecipeChoice; @@ -337,6 +338,12 @@ private Item getDefaultCraftingTable() { } private void craftingTableOnInteract(@NonNull PlayerInteractEvent event, @Nullable ItemStack item) { + if (event.getPlayer() + .getOpenInventory() + .getTopInventory() + .getType() != InventoryType.CRAFTING) { + return; + } event.setCancelled(true); this.api.getCraftingUiManager() .openCraftingTable(event.getPlayer());