diff --git a/CHANGELOG.md b/CHANGELOG.md index 1549887fd..a5f059704 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ * Fixed Slimefun items applying damage to items with an `unbreakable` tag * Fixed #2930 * Fixed #2926 +* Fixed Grappling Hook vanishing in creative mode ## Release Candidate 21 (14 Mar 2021) https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#21 diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GrapplingHook.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GrapplingHook.java index df0c0f600..57c8e8c47 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GrapplingHook.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/tools/GrapplingHook.java @@ -4,6 +4,7 @@ import java.util.UUID; import javax.annotation.ParametersAreNonnullByDefault; +import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.entity.Arrow; import org.bukkit.entity.Bat; @@ -54,7 +55,7 @@ public class GrapplingHook extends SimpleSlimefunItem { return e -> { Player p = e.getPlayer(); UUID uuid = p.getUniqueId(); - boolean isConsumed = consumeOnUse.getValue(); + boolean isConsumed = consumeOnUse.getValue() && p.getGameMode() != GameMode.CREATIVE; if (!e.getClickedBlock().isPresent() && !SlimefunPlugin.getGrapplingHookListener().isGrappling(uuid)) { e.cancel();