-
Total de itens
368 -
Registro em
-
Última visita
Respostas na Comunidade
-
_Kurimatzu_'s postagem in [Dúvida Cruel] ArrayList da sofrência ;-.; was marked as the answer
List<String> mundos = (List<String>) getConfig().getStringList("mundos"); Player p = ....; for(String s : mundos) { if (p.getWorld().getName().equals(s)) { // Seu código.... } } Não testei. Deve funcionar.
-
_Kurimatzu_'s postagem in [Resolvido] [Dúvida] URGENTE was marked as the answer
Ou é a variável sc está nula.
Ou o jogador não tem clan.
Manda o código no skypson.
-
_Kurimatzu_'s postagem in [Resolvido] Duvida (Evento usando config e metadata de item) was marked as the answer
@EventHandler public void crafting(CraftItemEvent e){ for(String s : cCraftBans.getStringList("cCraft.blocked")) { String[] metadata = s.split(":"); ItemStack i = e.getRecipe().getResult(); Material tipo = Material.getMaterial(Integer.valueOf(s)); System.out.println(tipo); if(i.getType() == tipo) { e.setCancelled(true); e.getWhoClicked().closeInventory(); ((Player)e.getWhoClicked()).sendMessage("§cEsse item está bloqueado."); } if(i.getData() == null) return; if(i.getData().getData() == 0) return; System.out.println(metadata[0]); if(i.getData().getData() == (byte)Byte.valueOf(metadata[0])) { e.setCancelled(true); e.getWhoClicked().closeInventory(); ((Player)e.getWhoClicked()).sendMessage("§cEsse item está bloqueado."); } } } } Tenta
-
_Kurimatzu_'s postagem in [Resolvido] [Dúvida] Qual erro? was marked as the answer
Você está declarando a entidade em Jogador..
Coloque isso:
@EventHandler public void WitheredGetHit(EntityDamageByEntityEvent e) { if(e.getEntity() instanceof Player && e.getDamager() instanceof Wither) { Player p = (Player)e.getEntity(); Entity damager = (Entity)e.getDamager(); Random rand = new Random(); rand.nextInt(40); p.addPotionEffect(new PotionEffect(PotionEffectType.WITHER, 80, 1)); e.setCancelled(false); } } -
_Kurimatzu_'s postagem in [Resolvido] Um erro chato, impossível burla.. was marked as the answer
String jogadores = "Jogadores online(s) @online";
p.sendMessage(jogadores.replace("@online",""+Bukkit.getonlinePlayers().length);
-
_Kurimatzu_'s postagem in [Resolvido] [Dúvida] Porcentagem. was marked as the answer
Random r = new Random(100); int valor = r.nextint(100); if(valor == 70) { // 70%// } Deve esta errado..
-
_Kurimatzu_'s postagem in [Resolvido] Dúvida Bau Selector was marked as the answer
Feche uma '}' debaixo do p.chat("/pvp");