Jump to content

[1.7.10] Adding 'score' to a player


ryancpexpert

Recommended Posts

There are multiple instances inside my mod where I need to add a score to track whether the player should be given a item, or if the player can use the item. I know I can declare a integer and use that, however, I want this to be able to function on multi player, and only set it for the player. Any help is appreciated.

There's 10 types of people in this world; Those that understand binary and those that don't.

Link to comment
Share on other sites

NBT

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Link to comment
Share on other sites

Set an integer in the player's data for the score per-player.

 

NBT stands for Named Binary Tag. It's very useful for per-player integers/boolean/strings/etc.

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.