Hey guys, I'm trying to work on something and I need a little bit of help.
Code:
if (command[0].equalsIgnoreCase("wildy2") & player.getInventory().contains(15643) || player.getInventory().contains(15640) || player.getEquipment().contains(15643) || player.getEquipment().contains(15640)) {
player.getPacketSender().sendMessage("You can't take custom Armour/Weapons in here!");
} else {
TeleportHandler.teleportPlayer(player, new Position(3104, 5537), player.getSpellbook().getTeleportType());
}
That's the command I have, but everytime I do another teleport like ::home it teleports me to this area, which isn't what I want, I want it to teleport me to this area if I'm not wearing or have any of the listed items in my invent.
I would also like some help on an easier less code way of listing the items.
All help is appreciated, thanks!