1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Fixed Grappling Hook vanishing in creative mode

This commit is contained in:
TheBusyBiscuit 2021-04-03 14:08:21 +02:00
parent 5e87df873c
commit 18139bb5c4
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -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<ItemUseHandler> {
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();