[INFO/ADMN/GEN]RuleRewards v2.0.0 - Rules with Rewards [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by Tamewolf, Nov 22, 2012.

  1. Offline

    Tamewolf

    RuleRewards - Rules with Rewards
    Version: 2.0.0

    First plugin I've developed, was actually made for my own personal server, but I wanted to share it, as I haven't seen the idea used before (hence the making it myself).

    RuleRewards on DevBukkit

    Download Here - Dev Bukkit

    Features:
    • Incentives: Give something to those who actually read your rules.
    • Permission Support: Optional permission support, allowing you to change a user's group when they accept the rules
    • Economy Support: Optional reward option to reward your players with virtual money instead of an item.
    • New Custom Commands: Put any number of commands you want in the commands section separated by commas (","), and turn it to true! Now you can give Reward Tokens for accepting the rules!
    • Color codes! All the text is entirely customizable in colors.
    • Protection: If something isn't properly configured, it doesn't break the plugin! It defaults and still gives your users a diamond for accepting the rules! Also, if someone attempts to accept rules again, it won't allow it!
    • Easy to Configure: Everything in the config is easy to read and configure.
    Uses:

    Vault - Vault is NOT required, unless you want to take advantage of the Economy.

    Note: If you downloaded a version prior to 2.0.0, delete your config and let the plugin make a new one for you. The new config file is much more documented and has all the new options. You do NOT need to delete anything else. New config IS NOT backwards compatible.

    Example of how one might configure this to work is to set a default group with little to no permissions, and upon accepting the rules, they get a full user's abilities and a little something to help them get started!

    Permissions:
    rr.admin - Allows users with permission to use /rr purge and /rr reload

    Commands:
    /rules - Prints the list of rules from /plugin/RuleRewards/Rules.txt
    /acceptrules - Accepts the rules, and rewards the user
    /rr purge - Wipes the storage file, meaning everyone can get rewards again
    /rr reload - Reloads the plugin

    Full Changelog is available on DevBukkit

    Known Issues:
    None!

    If you can think of something else you would like added/changed let me know!

    Updated to 1.0, polishing off most of the TODO's for the project.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  2. Offline

    Tamewolf

    Updated to 1.4, and pretty much have finished everything I want the plugin to do. If you have any issues, feel free to let me know. Also, if you would like something added feel free to reply!
     
  3. Offline

    Chaositic

    I like the idea of this plugin alot. One feature request I have is that when a user types /acceptrules it also promotes them to a configurable group like the usual member rank someone has on a server that lets them build etc.
    As far as I know, there are no updated promotion plugins that do this.

    An example config might be something like:
    #Group to be promoted to
    Promotion-setting: on
    Promotion-group: groupname

    Please consider it :D

    Cheers.
     
  4. Offline

    Tamewolf

    Hm, sure! Sounds like a good idea even. Will see what I can do.
     
  5. Offline

    Chaositic

    Also wanted to let you know I've tested it out and may have found a bug. I'm running 1.4.5-R0.2 and v1.4 of your plugin and I've set in the config use money instead of items as per your instructions. So I reload it on the server, purge and do /rules and /acceptrules. It still gives me items instead of a money amount. I have latest Vault installed as well. There is also no error in the console.
    Here's the relevant part of the config:
    Reward: Money
    RewardAmt: 100

    Hope that helps you out. Let me know if you need any other info.
     
  6. Offline

    Tamewolf

    I'm guessing it gave you 1 diamond, yes?
     
  7. Offline

    Chaositic

    Vault is definitely installed and it works fine with Essentials which is what our economy is so I don't think that's it. It also gave 2 diamonds but the RewardAmt config line is set to 100.

    Edit:
    25.11 08:20:48 [Server] INFO [RuleRewards] RuleRewards v 1.4: Thanks for using RuleRewards!
    25.11 08:20:48 [Server] INFO [RuleRewards] Enabling RuleRewards v1.4
     
  8. Offline

    Tamewolf

    Curious. I just ran it again on my server. Could I get the full copy and paste of your config? I set it to give the default reward amount in the event something wasn't configured properly. Also, the log of the server loading would be helpful, as I have it log messages on load that should help.

    Might help, which econ plugin are you using?
     
  9. Offline

    Chaositic

    Essentials.
    Code:
    DisplayMOTD: true
    MOTD: Use /rules for a list of server rules and to look for treasure.
    RewardMsg: Here's your reward for being such a fine citizen.
    DenyRewardMsg: Nice try troublemaker!
    Reward: Money
    RewardAmt: 100
    
    I can send you the server log in PM if you want.
     
  10. Offline

    Tamewolf

    Vault supports Essentials. I just installed Essentials onto my test server, purged /rules and /acceptrules and it gave me the amount of cash I had set it to do. Here is a copy of my config file:

    Code:
    DisplayMOTD: true
    MOTD: Use /rules for a list of server rules and to look for treasure.
    RewardMsg: Here's your reward for being such a fine citizen.
    DenyRewardMsg: Nice try troublemaker!
    Reward: Money
    RewardAmt: 100
    Try: Shut server down, edit config, then start server. I will test my reload with the config files.

    Edit: Yep, that's where it is at. I actually already fixed this with how the values are saved and reloaded in the update I am working on right now. Sorry for the inconvenience!

    Updated to 1.5! Added permission support. For best results, delete your config file and let the plugin regenerate it for you.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  11. Offline

    Lolmewn Retired Staff

    Title should be [INFO/ADMN/GEN]
     
  12. Offline

    Tamewolf

  13. Offline

    Chaositic

    I can confirm that it all works as intended. I've tested out the group changing option and it works awesome. Thanks for all your work :D
     
  14. Offline

    Tamewolf

    Updated to 1.5.1, fixed the MOTD not displaying.
     
  15. Offline

    Tamewolf

    Updated to 1.5.2, fixing a way to exploit the plugin due to incorrectly storing values and the MOTD now has color support.
     
  16. Offline

    Tamewolf

    Updated to 1.6, adding the ability to properly reload config without reloading the server. But the big story is now you are able to give BOTH items and money.
     
  17. Offline

    Chaositic

    Alright so, I edited the rules a few versions back to show these 5 lines when you type /rules :
    1. Test1
    2. Test2
    3. Test3
    4. Test4
    5. Test5

    So now with version 1.6, after the config was regenerated, I edited each rule line and replaced them with:
    1. Optifine only; No cheat clients
    2. No X-raying
    3. No Exploiting or Duping
    4. No Chat Spamming or Advertisements
    5. No asking for OP

    I did this, saved and then typed /rr reload. I type /rules and it gives me this:
    1. Test1
    2. Test2
    3. Test3
    4. Test4
    5. Test5
    1. Optifine only; No cheat clients
    2. No X-raying
    3. No Exploiting or Duping
    4. No Chat Spamming or Advertisements
    5. No asking for OP

    So I erased the tests, saved and restarted the server. It goes back to just tests showing. I've even tried deleting the rules.txt and uploading a new one from my computer to the server's ftp. For whatever reason, its storing old rules regardless of all I've tried. Just figured I'd let you know about it.
     
  18. Offline

    Tamewolf

    Undoubtedly something wrong with how the files reload. To fix this, currently, the best way to ensure that it reloads properly is to shut server down, edit, and start again. I will look into the code and see if I can't fix that though, seems like it's pretty simple.

    1.6.1 Released. Fixes the rules not loading properly. I've tested it and it now works whether the plugin is reloaded or not. It was a pretty simple fix, as I thought. Sorry I didn't properly test it last night.

    Enjoy!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  19. Offline

    Chaositic

    No problem, thanks for all your quick fixes! :D
     
  20. Offline

    Tamewolf

    Updated to 1.6.5! The group issues that might have occurred are now fixed and are now logging statistics.
     
  21. Offline

    Tamewolf

    Updated to 1.7.0! The entire code was reworked and made easier to manage and more efficient, but more importantly, you can now configure custom commands to trigger when a player accepts the rules! Also now can disable the rewards entirely (if you don't want them, it may be better to look for other plugins though!)
     
  22. Offline

    ahuby09

    hmm if the player types /help more then once will they get the reqrd more then once if so then people would be able to spam /rules and get rewards
     
  23. Offline

    Tamewolf

    Typing /help shouldn't have any effect on this plugin. However typing /rules multiple times will not allow the player to accept the rules multiple times. The initial versions of the plugin had that bug, but it has been long since fixed.
     
  24. Offline

    Tamewolf

    A huge overhaul of the code was performed, and thus RuleRewards 2.0.0 was born! Using it's awesome super powers, it now runs at it's most efficient state, has been updated to work with Java 1.6 users and now has properly working custom commands that can be run when a player accepts the rules! Just be sure if you used anything prior to this release, that you delete your old config, and let this release make a new one.
     

Share This Page