So this is the code i have and i tryed to make is say you need a key to enter when it dont contain a key in invent what am i doing wrong?
Code:
//comming soon!
if (object.getId() == 48802)
player.getInventory().containsItem(989, 1);
player.setNextWorldTile(new WorldTile(3245, 9664, 0));
player.getPackets().sendGameMessage("Welcome to the Crystal Chest Minigame,Run North For your Life!,Good Luck");
return;
}else{
player.getPackets().sendGameMessage("You need Crystal Key to Enter.");
Eclipse is saying to remove the "else" :/