making it shout to the server when a player defeats a npc.
i have added this.
Code:
Client c3 = (Client) PlayerHandler.getPlayerHandler().players[p1];
for (int j = 0; j < PlayerHandler.getPlayerHandler().players.length; j++
if (PlayerHandler.getPlayerHandler().players[j] != null)
Client c2 = (Client)PlayerHandler.getPlayerHandler().players[j];
c2.sM("@[email protected]: "+c3.username+" has just defeated "+getNpcListName((i))+"!");
}
}
it says the players name and a random npc name, not the actual name of the npc defeated.
What am i doing wrong?