Jump to content

[1.8.8] Persistent Log of Player Stats


HTTP 404

Recommended Posts

Does anyone have recommendations for how one might keep a persistent log of player accomplishments (not achievements) both on and offline?

 

For the sake of example, say player "Max" logs onto the server and starts mining. If he were to input a command, upon execution, he would receive such information as his in-game name, the total number of blocks he's mined throughout his time on the server, and really any other accumulated statists relevant to his character; this information, however, should be persistent.

 

I have seen some people recommending use of a hash map for logging and retrieving desired information about players but would the information in the map continue to exist upon a server restart? Would it perhaps be better to keep track of things via text log? If anyone has advice/questions I would greatly appreciate your guidance.

 

Just to clarify, I'm not asking for specifics, just general guidance.

 

Money can't buy everything but I'd rather cry in a mansion...

Link to comment
Share on other sites

For stuff like this, you generally want to use IExtendedEntityProperties (IEEP).

IEEP allows you to assign data to players and save it to player data file.

Note that IEEP is only loaded when player is online, but nothing stands in your way to read player.dat yourself (Java IO and CompressedStreamTools).

 

Also note that Vanilla alredy has some stats (I think it does track e.g blocks mined), just saying.

 

Tutrial on IEEP:

http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571567-1-7-2-1-6-4-eventhandler-and

 

 

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

For stuff like this, you generally want to use IExtendedEntityProperties (IEEP).

IEEP allows you to assign data to players and save it to player data file.

Note that IEEP is only loaded when player is online, but nothing stands in your way to read player.dat yourself (Java IO and CompressedStreamTools).

 

Also note that Vanilla alredy has some stats (I think it does track e.g blocks mined), just saying.

 

Tutrial on IEEP:

http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571567-1-7-2-1-6-4-eventhandler-and

 

Thank you so much for the tip and link.

 

And yea, I was just using that as an example to make a point.

Money can't buy everything but I'd rather cry in a mansion...

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.