From f87a1d3660f03de84949f0787976ccf6e5d7649f Mon Sep 17 00:00:00 2001 From: Seggan Date: Sun, 4 Oct 2020 15:07:11 -0400 Subject: [PATCH] Added research check --- .../slimefun4/implementation/listeners/ElytraCapListener.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/ElytraCapListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/ElytraCapListener.java index 76a6f7e1b..c3e46da33 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/ElytraCapListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/ElytraCapListener.java @@ -3,6 +3,7 @@ package io.github.thebusybiscuit.slimefun4.implementation.listeners; import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; import io.github.thebusybiscuit.slimefun4.implementation.items.armor.ElytraCap; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; +import me.mrCookieSlime.Slimefun.api.Slimefun; import org.bukkit.Sound; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -32,6 +33,7 @@ public class ElytraCapListener implements Listener { Player p = (Player) e.getEntity(); if (p.isGliding()) { ItemStack stack = p.getInventory().getHelmet(); + if (!Slimefun.hasUnlocked(p, stack, true)) return; SlimefunItem item = SlimefunItem.getByItem(stack); if (item instanceof ElytraCap) { e.setDamage(0);