This commit is contained in:
ASangarin 2020-10-18 16:29:38 +02:00
commit 4564d661e2

View File

@ -20,7 +20,6 @@ import net.Indyuce.mmoitems.api.ability.SimpleAbilityResult;
import net.Indyuce.mmoitems.api.player.PlayerStats.CachedStats;
import net.Indyuce.mmoitems.api.util.NoClipItem;
import net.Indyuce.mmoitems.stat.data.AbilityData;
import net.mmogroup.mmolib.MMOLib;
import net.mmogroup.mmolib.api.AttackResult;
import net.mmogroup.mmolib.api.DamageType;
@ -64,7 +63,7 @@ public class Throw_Up extends Ability implements Listener {
loc.getWorld().playSound(loc, Sound.ENTITY_ZOMBIE_HURT, 1, 1);
NoClipItem item = new NoClipItem(stats.getPlayer().getLocation().add(0, 1.2, 0), MMOLib.plugin.getVersion().getWrapper().getNBTItem(new ItemStack(Material.ROTTEN_FLESH)).toItem());
NoClipItem item = new NoClipItem(stats.getPlayer().getLocation().add(0, 1.2, 0), new ItemStack(Material.ROTTEN_FLESH));
Bukkit.getScheduler().scheduleSyncDelayedTask(MMOItems.plugin, () -> item.close(), 40);
item.getEntity().setVelocity(loc.getDirection().multiply(.8));
stats.getPlayer().getWorld().spawnParticle(Particle.SMOKE_LARGE, stats.getPlayer().getLocation().add(0, 1.2, 0), 0, loc.getDirection().getX(), loc.getDirection().getY(), loc.getDirection().getZ(), 1);