This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
My grenade:
@EventHandler public void Granaten(PlayerInteractEvent e){ if(e.getAction() == Action.RIGHT_CLICK_AIR){ Player p = e.getPlayer(); ItemStack Granate = new ItemStack(Material.DIAMOND, 1); ItemMeta meta52 = Granate.getItemMeta(); Granate.setItemMeta(meta52); if(p.getItemInHand().getType() == Material.DIAMOND){ final Item Grenade = p.getWorld().dropItem(p.getEyeLocation(), Granate); Grenade.setVelocity(p.getEyeLocation().getDirection().multiply(1.8)); if(p.getInventory().contains(Material.DIAMOND)){ p.getInventory().removeItem(Granate); p.updateInventory(); } Bukkit.getScheduler().scheduleSyncDelayedTask(this, new Runnable() { public void run() { if(Grenade.isOnGround()){ Grenade.remove(); World world = Grenade.getWorld(); world.createExplosion(Grenade.getLocation(), 4); world.playEffect(Grenade.getLocation(), Effect.WITCH_MAGIC, 9); world.playEffect(Grenade.getLocation(), Effect.LAVA_POP, 9); } } }, 80L); } } }
My Problem:
If the Grenade Explose it doesnt Heal the Blocks... But when I Place a TNT it will heal the Blocks...
Can u help me?
To post a comment, please login or register a new account.