Skip to content

Commit

Permalink
Opening the ItemCreator from the main menu now clears the previous item
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfyScript committed Mar 15, 2024
1 parent 9fbf37e commit 790dd64
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -34,6 +34,7 @@
import me.wolfyscript.customcrafting.utils.PlayerUtil;
import me.wolfyscript.lib.net.kyori.adventure.text.Component;
import me.wolfyscript.lib.net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
import me.wolfyscript.utilities.api.inventory.custom_items.CustomItem;
import me.wolfyscript.utilities.api.inventory.gui.GuiCluster;
import me.wolfyscript.utilities.api.inventory.gui.GuiHandler;
import me.wolfyscript.utilities.api.inventory.gui.GuiUpdate;
Expand Down Expand Up @@ -92,6 +93,8 @@ public void onInit() {
registerButton(new ButtonRecipeType(SMITHING, RecipeType.SMITHING, Material.SMITHING_TABLE));
builder.action(ITEM_EDITOR).state(s -> s.icon(Material.CHEST).action((cache, guiHandler, player, guiInventory, i, event) -> {
cache.setSetting(Setting.ITEMS);
cache.getItems().editorWasPreviouslyCancelled(false);
cache.getItems().setItem(new CustomItem(Material.AIR));
cache.getItems().setRecipeItem(false);
cache.getItems().setSaved(false);
cache.getItems().setNamespacedKey(null);
Expand Down

0 comments on commit 790dd64

Please sign in to comment.