Have something like this in my NPCHandler:
Code:
public void checkdrops(Client c, NPC i) {
if (c != null && i != null) {
int dropped1 = NPCDrop.rareDrops.get(npcs[i.npcType].npcType)[1][0];
c.sendMessage("Drop: "+ItemAssistant.getItemName2(dropped1)+"");
}
}
Code:
if(playerCommand.startsWith("drops") && c.playerRights == 3) {
int npc = Integer.parseInt(playerCommand.substring(6));
NPC n = Application.npcHandler.getNpcforId(npc);
Application.npcHandler.checkdrops(c, n);
}
But it draws null pointers. The code is simply to say what their first rare item drop is.