AutoGroup
Source
https://github.com/md-5/AutoGroup
Preface
AutoGroup was a mod I started a long time ago in response to the needs of a server I play on and of those requested by the general public. It has long spent it's time at the bottom of my todo list, instead my time devoted largely to custom plugin requests. Anyway, it is time for me to reveal it to everyone.
Information
AutoGroup is a unique plugin that aims to make the management of groups and promotions much easier for server owners. It keeps track of the time the player has spent online, date they joined and last join time in a sqlite database. This database is then used to give admins the ability to promote users once certain playtime goals are set. There is currently the ability for one longevity rank, ie. Spend one month on the server and three 'addiction ranks', eg accumulate a total of 100 hours playtime.
The other core feature of AutoGroup is it's PayPal donation management system, completely controlled by you! No information ever leaves your website at all. It's setup can be complicated, but I assure the rewards are great. This system makes use of PayPal's Instant Payment Notification API to give near instant confirmation of the payment, which is then inserted into a MySQL database ready for the user to claim. Safe, secure and fast semi-automatic donations.
Installation - Donations
- Run once to generate default config.
- Using phpMyAdmin or a similar tool create a database, if using the donation feature, that is accessible from both your web server and Minecraft server. You may need to make sure MySQL binds to the correct ip to allow outside access. Then place donate.php in a directory on your web server and edit the variables as outlined below:
$host = "localhost";
$username = "AutoGroup";
$password = "AutoGroup";
$database = "AutoGroup";
$myemail = "YOUR EMAIL HERE";
- Read this: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNSetup
- As I cannot have a PayPal account I can't tell you the correct steps, but read the instructions and you will figure it out. The URL is where you put donate.php In short if using a PayPal button you can add notify_url="http://yoursite.com/donate.php" else follow the instructions.
- If you wish to test using PayPal's sandbox API, use donate.php and follow the instructions here https://www.paypal.com/cgi-bin/webscr?cmd=p/sell/ipn-test-outside
- Put your database details in AutoGroup/config.yml
- Thats it!
Installation - Time features
The config is self explanatory, but here it is for reference:
EDIT: CODE TAGS DONE BROKE SO:
https://github.com/md-5/AutoGroup/blob/master/src/main/resources/config.yml
All times are measured in seconds. To disable a time feature set the time to 0. Addict ranks are given based on cumulative playtime and the loyalty rank is based on how long since they joined the server. The MySQL information is for donations only, and the rest is self explanatory. The default command will work for PermissionsBukkit users.
Commands
/donate [Transaction ID]
Command to donate via PayPal, simply follow it with the transaction id.
/playtime <Player name>
Show statistics about your playtime in seconds, and if you have the permission and another argument is specified, that players information.
Permissions:
autogroup.donate:
description: Allows use of the donate command
default: true
autogroup.playtime:
description: Allows use of the playtime command
default: true
autogroup.playtime.others:
description: Allows use of the playtime command on others
default: op
autogroup.norank:
description: Prevents player from being ranked
default: op
Show your thanks
Well as I may have outlined before, no PayPal account for myself, therefore no donations, however your thanks means a lot to me.
If you are an experienced server owner a tutorial video would be tremendous, just pm me!
Changelog
- Version 1.1.1 - Fix status bug
- Version 1.1 - Fix config and add norank
- Version 1.0 - Initial release
Hi would it be possible for an option to use logblock timeonline, or be able to import? (or even custom db option? :p)
Data is located in table lb_players and the 2 rows you need are playername and timeonline. Also the time is stored as seconds - It should be a very simple addition, and would be much appreciated.
Thanks
@aviator1014
How do I put the source java files back into a jar once I'm done editing the broadcast message. Please reply.Thanks :D
I i have a person in group "member" and i want them to be moved to "trusted" after 2 hours of play but only if they were in the group "member", is that possible to do?
@cublikefoot
my coowner just added it in himself :P gotta love open source
@boodahz
To get rid of the addict1 and addict2 effects, simply put 0 for both of them.
To customize the message, what you can do is copy the source code here https://github.com/md-5/AutoGroup-Time/blob/master/src/main/java/com/md_5/autogroup/time/PlayerData.java changing line 49 as you need, compile it as a class file (named PlayerData.class), and drop it in AutoGroup-Time.jar\com\md_5\autogroup\time\
Hello, I really like the idea of this plugin.
If you could, I feel that there are two things you need to have in an updated version (if you are planning on having one):
1. It is impossible not to have the the Addict1 and Addict2 lines. When you delete them, the jar will just add them on a server reboot.
2. Can we have a customizeable message? I would love to be able to simply change the text that outputs on a group change.
@aviator1014
playtime does not display anything for me either.
it really perturbs me when plugins don't have a reload command, but at least I found out very fast that it works, at least the promotion aspect does. (quite forceful when you only have 120 seconds to assign the norank permission lol) Plus I shouldn't ever have to reload again.
since the promotion does actually work I guess we don't really need the command, but /playtime does not display anything, even when used from the console in regards to a player.
Says -
-- spelling mistakejust so you know :3
@treestompz
You can find it in the old versions, I have removed it in Autogroup-Time as I wasn't even sure if it worked.
I am a bit confused where to find 'donate.php'
?
Thanks a lot for this plugin! really useful :)
@Skuxxboy1
Github can be found here: https://github.com/md-5/AutoGroup-Time
@Kartus
Short.er/a2fa8 Config?
None of the links work, and the in game comand /playtime doesn't seem to work.
When I type /playtime I see nothing. No error, no output, no "command does not exist". I'm op, btw.
Using Autgroup-time, PEX, and cb 2060
github.com links are broken in your description. can you please update them? i wish to have a look in the config before install.
Would be great to see an update on this ! :)
@md_5
any updates?
the /donate killer has the simple workaround and we've lived with the time format stuff long enough anyways - the plugin is doing exactly the job with regards to autopromoting groups that it should with the norank node usage, etc... I just dont use any part of it myself for the donation tie in, and thus never set it up (as others might do/have done) so its entirely up to you but im okay with waiting for a 'R5 compatible' one with these options and such
2) Even with "loyalty" set at 0 "to disable it" the only effect i see is "Only 0 seconds remaining until loyal" or however exactly worded that message would be in the middle of the screen, causing me to have to explain to EVERYONE at least once 'ignore it it means nothing' :) Please dont display the message if time is zero
3) "So boo, it says im at 53260 seconds now, how much is that?" perpetually - sure, its good for them to try to figure out math and what a target of 104000 seconds for their next rank goal might be, but for some of them that might as well be 30 weeks (and for others who cant do the math right, they calculate it out as 320 solid days...) Would it be possible please to reformat or provide a formatting option so that the reported "you joined the server 842234 seconds ago " and "you have been playing 7842 seconds" becomes HH:mm:ss format instead (or for the joined server at least, (days):H:M:S even)
Thanks in advance
@TheBoomer
Hmm I have a half finished complete rewrite of this that I will try to finish before R5, otherwise I will just update the old version