From 4bcce20249f3cdfed19eb17aae6d17208c4f492f Mon Sep 17 00:00:00 2001 From: ybw0014 Date: Sat, 8 Jun 2024 13:29:30 -0400 Subject: [PATCH] fix: fix the default index of Multitool modes (#4202) --- .../implementation/items/electric/gadgets/MultiTool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/gadgets/MultiTool.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/gadgets/MultiTool.java index d3087016aa..8f943f5866 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/gadgets/MultiTool.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/electric/gadgets/MultiTool.java @@ -80,7 +80,7 @@ protected ItemUseHandler getItemUseHandler() { ItemMeta meta = item.getItemMeta(); e.cancel(); - int index = PersistentDataAPI.getInt(meta, key); + int index = PersistentDataAPI.getInt(meta, key, 0); SlimefunItem sfItem = modes.get(index).getItem(); if (!p.isSneaking()) {