Advertisement
eTioCooK

etiocook

Mar 22nd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1. ``` //blocos
  2. if (e.getBlock().getType().equals(Material.PACKED_ICE)) {
  3. if (e.getPlayer().getWorld() == Bukkit.getWorld(Inicio.config.getString("Minerar.Mundo"))) {
  4. e.getBlock().setType(Material.AIR);
  5. int recompensaval = Inicio.config.getInt("Minerar.Blocos.GeloCompactado.Valor");
  6. Double premio = Double.valueOf(Inicio.config.getDouble("Minerar.Blocos.GeloCompactado.Valor"));
  7. String recompensa = Integer.toString(recompensaval);
  8. EconomyResponse r = Inicio.r.econ.depositPlayer(p.getName(), premio.doubleValue());
  9. sendActionBar(p, String.format((Inicio.config.getString("Minerar.Actionbar")).replace("&", "§").replace("<money>", recompensa)));
  10. }
  11. //Pegando a localização do player e aplicando um efeito
  12. Random random = new Random();
  13. int chance = random.nextInt(100);
  14. if (chance < 5) {
  15. p.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 120, 1));
  16. p.sendMessage(Inicio.config.getString("Minerar.Mensagens_Recebeu_Efeito").replace("&", "§"));
  17. p.playSound(p.getLocation(), Sound.LEVEL_UP, 1.0F, 1.0F);
  18. }
  19. //Pegando o mundo e localização do player e aplicando um explosão
  20. if (chance <= 100) {
  21. p.getWorld().createExplosion(p.getLocation(), 3.0F);
  22. int recompensaval = Inicio.config.getInt("Minerar.Premio_Explosao");
  23. Double premio = Double.valueOf(Inicio.config.getDouble("Minerar.Premio_Explosao"));
  24. String recompensa = Integer.toString(recompensaval);
  25. EconomyResponse r = Inicio.r.econ.depositPlayer(p.getName(), premio.doubleValue());
  26. Titulos title = new Titulos(" §b§lVocê aplicou uma Explosão", "§fe recebeu + §a$" + recompensa + " §e(§2Money§e)");
  27. title.send(p);
  28. }
  29. if (p.hasPermission("Minerar.vip")) {
  30. int recompensaval = Inicio.config.getInt("Minerar.Blocos.GeloCompactado.ValorVip");
  31. Double premio = Double.valueOf(Inicio.config.getDouble("Minerar.Blocos.GeloCompactado.ValorVip"));
  32. String recompensa = Integer.toString(recompensaval);
  33. EconomyResponse r = Inicio.r.econ.depositPlayer(p.getName(), premio.doubleValue());
  34. Bukkit.broadcastMessage("Passou");
  35. } else {
  36. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement