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:
parent
5e87df873c
commit
18139bb5c4
@ -61,6 +61,7 @@
|
|||||||
* Fixed Slimefun items applying damage to items with an `unbreakable` tag
|
* Fixed Slimefun items applying damage to items with an `unbreakable` tag
|
||||||
* Fixed #2930
|
* Fixed #2930
|
||||||
* Fixed #2926
|
* Fixed #2926
|
||||||
|
* Fixed Grappling Hook vanishing in creative mode
|
||||||
|
|
||||||
## Release Candidate 21 (14 Mar 2021)
|
## Release Candidate 21 (14 Mar 2021)
|
||||||
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#21
|
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#21
|
||||||
|
@ -4,6 +4,7 @@ import java.util.UUID;
|
|||||||
|
|
||||||
import javax.annotation.ParametersAreNonnullByDefault;
|
import javax.annotation.ParametersAreNonnullByDefault;
|
||||||
|
|
||||||
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.entity.Bat;
|
import org.bukkit.entity.Bat;
|
||||||
@ -54,7 +55,7 @@ public class GrapplingHook extends SimpleSlimefunItem<ItemUseHandler> {
|
|||||||
return e -> {
|
return e -> {
|
||||||
Player p = e.getPlayer();
|
Player p = e.getPlayer();
|
||||||
UUID uuid = p.getUniqueId();
|
UUID uuid = p.getUniqueId();
|
||||||
boolean isConsumed = consumeOnUse.getValue();
|
boolean isConsumed = consumeOnUse.getValue() && p.getGameMode() != GameMode.CREATIVE;
|
||||||
|
|
||||||
if (!e.getClickedBlock().isPresent() && !SlimefunPlugin.getGrapplingHookListener().isGrappling(uuid)) {
|
if (!e.getClickedBlock().isPresent() && !SlimefunPlugin.getGrapplingHookListener().isGrappling(uuid)) {
|
||||||
e.cancel();
|
e.cancel();
|
||||||
|
Loading…
Reference in New Issue
Block a user