Skip to content

Commit

Permalink
Merge pull request #30 from liquip/fix/crafting-table-drop
Browse files Browse the repository at this point in the history
Fix items not droppable in crafting table
  • Loading branch information
Skienex authored Dec 31, 2022
2 parents 4cbf406 + 17b7d1d commit 6773d03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
allprojects {
group = "io.github.liquip"
version = "2.0.1-beta"
version = "2.0.2-beta"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 6773d03

Please sign in to comment.