Code: //FIREMAGE if((event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK)){ ItemStack item = event.getPlayer().getItemInHand(); if (item.getTypeId() == FiremageItemId) { long lastUsed = 0; if (Firemage.containsKey(player.getName())) lastUsed = Firemage.get(player.getName()); if (lastUsed + (1000 * cooldown3) > System.currentTimeMillis()) { event.getPlayer().sendMessage( String.format(FiremageCooldownMessage, (-((System.currentTimeMillis() - (lastUsed + (1000 * cooldown3))) / 1000)))); } else { Hey, I made this pseudo with a cooldown, and I don't know a pseudo for when right click shot a firecharge ball or a (fireball).. Can someone make this pseudo thanks!
Shot a fireball from a blaze_rod when you right click.. I only need the projectile pseudo, I'm noob and I don't know how to do it
Yes, and idk how to do it, i don't even have the idea.. Because this I created this thread, for someone make the pseudo.. Can you please make it? thanks if yes!
Code: public void onPlayerInteract(PlayerInteractEvent event) { Player p = event.getPlayer(); if(event.getAction() == Action.RIGHT_CLICK_AIR && p.getItemInHand().getType() == Material.BLAZE_ROD){ final Item toShoot = p.getWorld().dropItem(p.getEyeLocation(), new ItemStack(Material.FIREWORK_CHARGE)); toShoot.setVelocity(p.getLocation().getDirection().normalize().multiply(2)); } } Something like this will work, got it from the source of one of my plugins.
Did you attempt to go on the website I posted? You can look up how to do it yourself. There's a search bar. Search for the spawn method. Find out what parameters it takes.
Hey, so I made the code, but do you know some way to increase the fireball explosion damage in the player? Code: Location loc = player.getEyeLocation().toVector().add(player.getLocation().getDirection().multiply(2)).toLocation(player.getWorld(), player.getLocation().getYaw(), player.getLocation().getPitch()); @SuppressWarnings("unused") Fireball fireball = player.getWorld().spawn(loc, Fireball.class); player.playSound(player.getLocation(), Sound.NOTE_PIANO, 10, 0);
@zack6849 and @Iervolino pseu·do [soo-doh] adjective 1.not actually but having the appearance of; pretended; false or spurious; sham. 2.almost, approaching, or trying to be. Do some research in the bukkit apidocs (google it) That is where you can see every single method Bukkit has. If you make the attempt to do some research prior to asking, your chances of people responding will quadruple, even if you still don't understand it. Because right now all you are doing is going around and asking for the code and you are barely doing any of it yourself. And I am not saying asking to see code is bad because that can help you understand. You are going to need to use the ExplosionPrimeEvent for what you need. Here is the page for it: http://jd.bukkit.org/rb/doxygen/d0/..._1event_1_1entity_1_1ExplosionPrimeEvent.html EDIT by Moderator: merged posts, please use the edit button instead of double posting.