DailyBonus
DailyBonus- Daily Login Bonuses
Want to help update DailyBonus? Contact gomeow
This plugin give a bonus once a day to players who log in. The amount is configurable.
There is an option in the config file for a delayed time until they get the bonus. If the player logs out before getting the bonus, then it will remember that they didn't get the bonus yet for that day, and attempt to make them wait the time again.
You can also give items based off a list in the config file.
The plugin uses SuperPerms (all permissions plugins will work, is what this means) for Permissions and Vault for economy, so all plugins that support those will work with DailyBonus!
Watch the video!
The Tier system:
The tier system allows you to have as many tiers as you want, as long as you change the "Number of Tiers" option in your config.
How tiers work:
- Tier number, 1 being the lowest tier
- So the highest admins/ops/VIPs will be given the highest Tiers, while defaults/noobs get the lowly Tier 1.
Economy Bonus
- The economy amount will be given as long as Vault is enabled. If you don't use an Economy, then set the values to 0.
- Again, you NEED Vault to give an economy amount with DailyBonus.
- To have a random amount of economy, put the "base-values;random-amount" down. So "20;5" would give a random amount between 5 more or 5 less than 20, aka 15-25 currency.
Message:
- This message will be sent to the player when they get their DailyBonus. Color codes such as &6 and &4 work.
- (Full list here!).
- !amount will be replaced with the economy amount given.
- !type will be replaced with your currency, if available.
Items:
- This is a list of items the player will be given. "x;y" -> x being the item ID and y being the amount to give. So "266:5" would give 5 Gold Ingots!
- If you don't want to give any items, set one ID of 0 or just leave it empty.
- To give random items, set the line to "x;y;z", with x and y the same as above, and z being the max or min that will be added/subtracted from the y.
- To give items with a data value add a "-d" to the end of the item line, with the d being a data value.
- Example - "5;10;5-1" - This would give 5 to 15 wood planks (ID 5) with a data value of 1 (Darkwood).'
- Item Give Delay (In Seconds): This is how many seconds the plugin will wait to give the bonus. So if you set it to 5 minutes (300 seconds), the player must login and stay online for 5 minutes before getting the bonus. If they log out early, the timer will stop and they must wait another 5 minutes to get it for that day.
Permissions:
- dailybonus.tier.#
- # being the tier number. So 'dailybonus.tier.1', 'dailybonus.tier.2', 'dailybonus.tier.3', and so on.
- You can have an unlimited amount of tiers, just change the "number of tiers" option in the config accordingly.
- Players will not inherit the other tiers. For example - even if admin's with tier.2 were set to inherit the default groups tier.1 they would not get items from both sections.
Features:
- Daily amount given (configurable) when a player logs in each day.
- Permissions based on tier systems
- Custom message for each tier
- !amount is replaced by the actual amount in the message
- Item giving
- If the player's inventory is full, items will drop at their feet!
Commands
- '/DailyBonus reload' - Reloads the plugin - Permission 'dailybonus.reload'
Get Vault here if you are using an Economy plugin!
Roadmap:
- Suggest Stuff!
Glad you got this plugin working again.
However, I seem to be experiencing some issues where some members of a group are getting the bonus when they login, but others appear not to be. This is not limited to one group either.
As far as I can tell it seems to be a problem for users to be logged in over the time period that the 24hr period ticks over. This is only a theory, but thought I would post here to see if it was something you or any other users were aware of.
Thanks for great work and keep it up!
@Cyberium59
Sure! Permission will be 'dailybonus.reload'
@itsatacoshop247
Can you add a reload command (/dailybonus reload) ?
@np98765
Well...that shouldn't be happening.
Can you go look in the players.yml file, and upload it to pastebin for me? Uploading the config file couldn't hurt too?
Are you using a server wrapper to restart the server? If the wrapper isn't properly shutting down plugins, then the players.yml would not be getting saved correctly.
This is probably an isolated incident since I can't recreate the issue with manual stopping and starting, and I've gotten no other reports about it. Hopefully we can get it fixed though.
I have an issue... After a restart, bonuses are given AGAIN. This doesn't work, since my server automatically restarts every 6hrs to reduce lag, etc.
Is there any way you could fix this soon? Thanks :D
I really love this plugin and it would be a shame to have to disable it...
@rajinhear
Yes.
Does it work with PEX?
@GrimblyGorn
I just do player.getInventory().addItem(items from config) so I'm assuming it just doesn't give it to them. I can make it send a message of "you would get items but your inventory is full!" And then have it try again next login.
I will add metadata support as well.
What happens if their inventory is too full ? Also will it accept meta values like 373:32;5 to give 5 mundane potions ?
There we go! Good job on the update, this plugin works very nicely.
Version 2.3
Download here!
I found the massive issue that was causing no bonuses - I didnt test the plugin enough, so sorry. Did a bunch of testing today on this version, so it should be good it go. You can now edit a player's last login time in the players.yml for testing, or simply change 'Logged Early" to true.
@Darkhand81
Again, thanks for the info, my bad. It's all fixed now. I'll have the source on github in a few minutes if you care to look.
@np98765
Fixed in new version, sorry.
@fjutte
This feature is added now!
@Darkhand81
Oh bollocks, I had no idea it wasn't implemented. Weird. Okay it'll take me a few minutes to fix that, and update to 1.2.5!
Thanks for looking as that!
is not work LWC anf IConomy :(
I'd really love to use this plugin since it's exactly what I'm looking for on my server, but looking through the code I can't see how it would work.
You use getLastPlayed() to check when the player last logged in, but if you look at the Bukkit Javadocs, it's not implemented yet.
Take a look here... This is the javadoc entry. You'll see 'Implements org.bukkit.OfflinePlayer.' which is a completely unimplemented function right now.
Follow the link there that says 'Definition at line 592 of file TestPlayer.java.' Here's a link.
The code is:
That would mean that money is paid out only the first time a player logs in... getLastPlayed() will always report nothing.
What I think you need to do is create a way to track player logins within the plugin... Since the data can be cleared every day, a flat file should be fine for even large servers. Everything else is good!
@np98765
What version of DailyBonus do you have?
Every time someone new (without a player.dat file) logged in, it lagged out the server.
Finally got GitHub working, source code link is in main post for those who want to see it.
@DarthyDen
It's called DAILYBonus. The idea is that you get it once per day. So, wait until tomorrow :D
I only got the bonus the first time logged in after installing the plugin. It doesent seem to give me a bonus anytime after the initial login.
Any ideas ?