Hey i am wondering i have some gun code.. Code:java else if(e.getPlayer().getItemInHand().getType() == Material.STONE_HOE){if(!recentlyFired.contains(player.getName())){ItemStack item = new ItemStack(Material.GLOWSTONE_DUST, 1);ItemMeta reName = item.getItemMeta();reName.setDisplayName(ChatColor.RESET + "Ammo");List<String> lore = new ArrayList<String>();lore.add(ChatColor.RESET + "For use on:");lore.add(ChatColor.RESET + "- MP5");reName.setLore(lore);item.setItemMeta(reName); Arrow arrow = (Arrow)player.launchProjectile(Arrow.class);arrow.setVelocity(arrow.getVelocity().multiply(5));arrow.setShooter(player);arrow.setMetadata("shotfrom", new FixedMetadataValue(this, "mp5"));recentlyFired.add(player.getName());inventory.removeItem(item);}} but what's happens is the arrow goes straight for a while the suddenly swings left or right Thanks, Deckerz
A few problems that might be responsible for this : try to define the arrow's velocity yourself, as spawning an arrow will give it a velocity of 0, if I'm not mistaken. Try to reduce the velocity, I'm not sure bukkit likes it if you have a velocity too big.
No, I think an arrow spawns with a velocity. Because I have some code I used a while ago for spread arrows and they work.