Jump to content

Define itemID to a number


shaba123

Recommended Posts

 

2 hours ago, shaba123 said:

How can i define an item id to a number?

I want to say itemId(991) = 12345;

So that i can check to see if my inventory contains itemId(991) and if it does then it will add 12345 to an integer.

Like I said in the other topic you made, use a HashMap, you can use a HashMap for item IDs too.

2 hours ago, d0zza said:

https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html

A HashMap will allow you to link an item or String (item name) to a particular integer (item value).

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...