Hello guys,
I'm working on a jewellery amulet/ring teleport system and i need some help
i have declared a array in server.Config like this:
Code:
public static final int[] JEWELLERY = {1712,1710,1708,1706}; //items that has a jewellery function
made a file called Jewellery.java in server.model.players
i have a function called isJewellery (public boolean isJewellery(int itemId))
Code:
public boolean isJewellery(int itemId) {
return Config.JEWELLERY.contains(itemId);
}
^in the function over (isJewellery) im trying to check if the array 'Config.JEWELLERY' contains '(int) itemId' and want it to return true or false, but its not working.
so my question is:
Is there a way to check if a array contains a specific value (integer) and return true if it does and false if it not.
Thanks, i will rep+ the user that can help me
Cheers,
Oleaa