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

Merge pull request #3127 from EpicPlayerA10/master

This commit is contained in:
Daniel Walsh 2021-06-19 09:37:23 +01:00 committed by GitHub
commit 68f8a36008
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,8 @@ package io.github.thebusybiscuit.slimefun4.implementation.items.weapons;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import io.github.thebusybiscuit.slimefun4.api.MinecraftVersion;
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
import org.bukkit.Effect;
import org.bukkit.Material;
import org.bukkit.entity.LivingEntity;
@ -41,8 +43,11 @@ public class IcyBow extends SlimefunBow {
if (p.isBlocking() && e.getFinalDamage() <= 0) {
return;
}
}
if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_17)) {
p.setFreezeTicks(60);
}
}
n.getWorld().playEffect(n.getLocation(), Effect.STEP_SOUND, Material.ICE);
n.getWorld().playEffect(n.getEyeLocation(), Effect.STEP_SOUND, Material.ICE);
n.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 20 * 2, 10));