Tried with armorstands, still not working :(
This commit is contained in:
parent
9afa829f89
commit
788326fe54
@ -5,12 +5,13 @@ import java.time.YearMonth;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
@ -74,12 +75,16 @@ public class ItemBubbleBlaster extends ItemGadget implements IThrown
|
||||
// TODO CHANGE COLOR IF RAINBOW
|
||||
// TODO COOLDOWN AFTER MAX OF 5 SECONDS HOLDING
|
||||
// TODO LAUNCH MULTIPLE WHILE HOLDING
|
||||
Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(Material.STAINED_GLASS, (byte) UtilMath.random.nextInt(15)));
|
||||
//Item item = player.getWorld().dropItem(player.getEyeLocation().add(player.getLocation().getDirection()), ItemStackFactory.Instance.CreateStack(Material.STAINED_GLASS, (byte) UtilMath.random.nextInt(15)));
|
||||
|
||||
UtilAction.velocity(item, player.getLocation().getDirection(),
|
||||
1, false, 0, 0.2, 10, false);
|
||||
ArmorStand armorStand = player.getWorld().spawn(player.getLocation(), ArmorStand.class);
|
||||
armorStand.setItemInHand(new ItemStack(Material.STAINED_GLASS, 1, (byte) UtilMath.random.nextInt(15)));
|
||||
armorStand.setSmall(true);
|
||||
armorStand.setVisible(false);
|
||||
|
||||
_manager.getProjectileManager().AddThrow(item, player, this, 1000, false, false, false, false, false, 0f);
|
||||
// _manager.getProjectileManager().AddThrow(item, player, this, 1000, false, false, false, false, 0f);
|
||||
//
|
||||
UtilAction.velocity(armorStand, player.getLocation().getDirection(), 1, false, 0, 0.7, 10, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user