Skip to content

Commit

Permalink
1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sjavi4 authored Dec 6, 2023
1 parent d09c75f commit 62169d8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.autobot</groupId>
<artifactId>SBCrafter</artifactId>
<version>1.2</version>
<version>1.3</version>
<packaging>jar</packaging>

<name>SBCrafter</name>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/me/autobot/sbcrafter/listener/OnCraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import java.util.*;

public class OnCraft implements Listener {
final Set<NamespacedKey> recipeKeys = new HashSet<>();
RecipeHandler recipeHandler;
ItemStack resultBox;
ItemStack resultContent;
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/me/autobot/sbcrafter/listener/PostCraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.CraftItemEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import org.bukkit.plugin.Plugin;
Expand All @@ -26,6 +28,11 @@ public void onCraft(CraftItemEvent e) {
if (recipe == null) return;

if (recipeHandler.getRecipe() == null) return;

if (e.getCursor().getType() != Material.AIR && !e.isShiftClick()) {
//e.setCancelled(true);
return;
};
ItemStack resultContent = recipeHandler.getRecipe().getResult();

List<Material> matrixContents = recipeHandler.getMatrixContentsList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.lang.reflect.Method;
import java.util.*;

public class RecipeHandler {
public final class RecipeHandler {
CraftingInventory inventory;
ItemStack[] matrix;
ItemStack[] matrixContents;
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: SBCrafter
version: '${project.version}'
main: me.autobot.resbcrafter.ReSBCrafter
main: me.autobot.sbcrafter.SBCrafter
api-version: '1.17'
folia-supported: true
load: POSTWORLD
Expand Down

0 comments on commit 62169d8

Please sign in to comment.