Ir para conteúdo
  • 0

Duplicando Mensagem


Ducky

Pergunta


      @EventHandler
  public void death(EntityDeathEvent e)
  {
    Player killer = e.getEntity().getKiller();
    LivingEntity dead = e.getEntity();
    if (((killer instanceof Player)) && ((dead instanceof Wither)))
    {
      this.Predador = killer.getName();
      getServer().broadcastMessage(seilamano");
      saveConfig();

 

Pq está duplicando a mensagem quando mata o wither?

Link para o comentário
Compartilhar em outros sites

15 respostass a esta questão

Posts Recomendados

Não custa nada tentar. xD

 

Sim.. Continuou a mesma duplicação.

 

http://gamersboard.com.br/topic/48960-leia-antes-de-postar-sua-d%C3%BAvida/

 

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

O que tem parça? Não infringi nada do tópico =)

 

meu bruxo, passa teu skype aí

live:zducky26

Link para o comentário
Compartilhar em outros sites


@EventHandler

public void asdsd(EntityDeathEvent a) {

Player p = a.getEntity().getKiller();

LivingEntity e = a.getEntity();

 

if (e instanceof Wither && e.getCustomName().equalsIgnoreCase("nome")) {

 

Bukkit.broadcastMessage("o bixao foi morto por " + p.getName());

 

}

 

}

Editado por Kurama
Link para o comentário
Compartilhar em outros sites

	@EventHandler
	public void asdsd(EntityDeathEvent a) {
		Player p = a.getEntity().getKiller();
		LivingEntity e = a.getEntity();

		if (e instanceof Wither && e.getCustomName().equalsIgnoreCase("nome")) {

			Bukkit.broadcastMessage("o bixao foi morto por " + p.getName());

		}

	}

perdão, nao entendi essa parte?

 

 e.getCustomName().equalsIgnoreCase("nome")) {

 

Já que pode ser qualquer wither..

Link para o comentário
Compartilhar em outros sites

perdão, nao entendi essa parte?

 e.getCustomName().equalsIgnoreCase("nome")) {

Já que pode ser qualquer wither..

	@EventHandler
	public void asdsd(EntityDeathEvent a) {
		Player p = a.getEntity().getKiller();
		LivingEntity e = a.getEntity();

		if (e instanceof Wither) {

			Bukkit.broadcastMessage("o bixao foi morto por " + p.getName());

		}

	}
Link para o comentário
Compartilhar em outros sites

	@EventHandler
	public void asdsd(EntityDeathEvent a) {
		Player p = a.getEntity().getKiller();
		LivingEntity e = a.getEntity();

		if (e instanceof Wither) {

			Bukkit.broadcastMessage("o bixao foi morto por " + p.getName());

		}

	}

Ainda duplica..

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...