Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add more functionality to the stats #31

Open
stgram opened this issue Sep 8, 2012 · 7 comments
Open

Please add more functionality to the stats #31

stgram opened this issue Sep 8, 2012 · 7 comments
Labels
🆕 enhancement An enhancement which can be a new feature.
Milestone

Comments

@stgram
Copy link

stgram commented Sep 8, 2012

Great plugin, good stats, but lacks one thing: really good stats.
Now you have global and per type wins.
How about, a complete list, about who played and won what?
And imagine, do it in MySQL as well. This way, the biggest winners can be easily announced on the server's website, and whatever else someone comes up with. Because, mysql is really easy to use, not like txt files.
Hope you look into this.

@graywolf336
Copy link
Owner

Yeah I've thought about this, but the thing is I'm just starting in learning mysql let alone java and mysql, BUT when I do get better in it then I will implement this. So, leaving this open to remind me.

@graywolf336
Copy link
Owner

Been thinking about this. What if we did flat file at first (since not everyone will want mysql and I'm still trying to figure out how to do mysql correctly inside Java) and the structure of the stat file be:

playername:
    slot:
        played:
        won:
        lost:
        moneyWon:
        moneyLost:
    slot2:
        played:
        won:
        lost:
        moneyWon:
        moneyLost:

Anything else you'd add to it? Does that layout make sense?

@graywolf336 graywolf336 modified the milestone: 2.6.0 Sep 9, 2014
@graywolf336
Copy link
Owner

Going to be adding an API, events, which are thrown and provide information about when things happen. Will possibly create another plugin to listen to these events and enable advanced stats, with support for flatfile, mysql, and mongo.

graywolf336 added a commit that referenced this issue Sep 9, 2014
Over the coming week I will be doing the following changes:
* Adding events to be thrown when something happens, allowing for other plugins to handle the stats for #31 and #49
* Making the controller blocks configurable, for #53
* Verifying that permissions are checked correctly, for #51
* Not overriding the config.yml, for #43
* Work on making sure the `/casino reload` command does everything correctly, for #45
@stgram
Copy link
Author

stgram commented Sep 9, 2014

oh hey there, got a random email about this. I closed down my server a while ago, so I am not up to things, but I can summarize once more what would be best /leaving it up to you to decide how it can be implemented/:
Most servers have an sql database and a simple website. People play in the casino ingame, win money. Since most servers are separate from the webhosting, the sql is perfect mediator between those two. If you add the option to write to the database each time someone wins something, with a simple single query the website could A) display highest/recent-est wins B) sum up stats about players having won the most/played the most C) overall statistics. In school I had a class about queries and know a thing or two, even with the simplest table structure you could query all kinds or results and statistics, nothing complicated. :)

@graywolf336
Copy link
Owner

Yup, that's exactly the idea I have through the usage of API and throwing events and having another plugin dedicated to listening to only those events so the main plugin doesn't get cluttered with database stuff.

@stgram
Copy link
Author

stgram commented Sep 10, 2014

Just a note, having two plugins for one thing can sometimes be problematic. Why not just implement as an option the inserting query for the database, in an async thread? I believe this won't take too much resources and will be a neat addition to whoever needs it without too much trouble.

@graywolf336 graywolf336 removed this from the 2.6.0 milestone Nov 18, 2015
@graywolf336 graywolf336 added this to the v3 milestone Apr 24, 2016
@graywolf336
Copy link
Owner

Another almost two years later and I've decided to take another stab at this plugin, revamping the code base (as it is terrible) and going to make a version 3. This will allow me to update how the stats are collected and stored, for those who still run a Minecraft server and use the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 enhancement An enhancement which can be a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants