Inactive [SEC] Rules v1.1 - Whitelisting via Rules [1240]

Discussion in 'Inactive/Unsupported Plugins' started by DigitalTyrant, Mar 19, 2011.

  1. Offline


    Rules - Whitelisting via Rules

    Version: 1.1 [jar]
    CraftBukkit: [b1240jnks]
    Description: Rules is a plugin that allows system administrators to deliver rules using a command.
    Administrators can disable build/destroy and chat until a visitor has accepted the rules.​

    Files (open)
    Rules.jar: Main plugin file

    Rules/rules.txt: File containing your server's rules. Can be colorized using the codes below.
    Automatically generated.​

    Rules/config.yml: File that stores settings and User status, layout and options below.

    Automatically generated.​
    config.yml (open)
    AllowChat: [true/false]
    Specifies whether a user can chat before accepting rules.​

    AllowBuild: [true/false]

    Specifies whether a user can build/destroy before accepting rules.​

    ShowOnLogin: [true/false]

    Specifies whether a login message is displayed reminding users that have not accepted the rules to do so. Useful if an motd plugin is in use.​

    LoginMessage: Message

    Message to be displayed if ShowOnLogin is set to true.​

    MessageColor: '&b'

    Defines default color for messages related to the Rules plugin.​


    Shown: [true/false] - Set to true when a user has been shown the rules​
    Accepted: [true/false] - Set to true when a user accepts the rules​

    Default values are bolded.
    Commands (open)

    Displays server rules to the user. Sets Shown to true for that user in config.yml​


    Command used to accept rules. User must first view rules in order to accept them. Sets Accepted to true for that user in config.yml​

    Command to allow an Op or authorized user via Permissions plugin to disable the Rules plugin. Designed for debugging. Server must be reloaded using /reload by an Op, reload from console, or by restarting the server in order to re-enable the Rules plugin. Currently in development.​

    /rulesviewed username

    Command to allow an Op or authorized user via Permissions plugin to view whether a user has seen the rules. Currently in development.​

    /rulesaccepted username

    Command to allow an Op or authorized user via Permissions plugin to view whether a user has accepted the rules. Currently in development.​
    Version 1.1 - [jar]
    fixed inaccurate version number reported in console​
    rule.txt is now created upon first run​
    updated event handler for CraftBukkit RB #617​
    disabled running of /acceptrules from console​
    cleaned code, removing and rearranging​
    fixed potential issue with Ops accepting rules​
    added command /disablerules​
    added command /rulesviewed​
    added command /rulesaccepted​

    Version 1.0 - [jar]
    Initial Release!​

    Thanks and Enjoy!
    Zacky1 and joby890 like this.
  2. Offline


    Looks nice :D GJ
  3. Offline


    This has a lot of potential. :)
  4. Offline


    Thanks, I hope people find use for it. I just finished another project I was working on, about to post it now. Then I will wrap up the additional commands for this plugin.
  5. Sounds just like the thing i searched.
    But can you set the rules to automatically be shown to new Users?
  6. Offline


    Could you make a command to accept the rules like when a guest types: /accept rules he will be set in the config file and he can build?
  7. Offline


    If the options:

    are set to false, then this plugin works as you describe. When a user logs in, views the rules, and uses command /acceptrules he will be able to Chat and Build. Until then, both will be disallowed.

    Currently there is no functionality to show all the rules when a user logs in, I have instead given the option to make users aware of the rules using:

    These options in the config.yml allow you to show the user a message describing the rules of the server. I have found that most servers use an Motd and I did not want to interfere with that. I may integrate the option to display all rules though.

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


    Hey it havent got rules.txt file!
    =S Why?
    Well, were going to create it =)

    sorry now there is a new file >=( its a joke?

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


    When you first run the plugin it will create the files, then you can modify them as you would like.
  10. Offline


    ... When you download the jar and run for the first time it will create only the config.yml
    To create the rules file automatically just type /rules on the server and it will create it.

    I mean: The rules.txt isn't created until 1 person types /rules on the server.
  11. Offline


    Gamerluke is correct, although this was not as intended. I will have a fix for this in v1.1
  12. Offline


    Thanks Mate; Your instructions were pretty clear... just thought I would add some extra clarity

    I love this plugin mate thanks alot.
  13. Offline

    The PC Tech Guy

    Looks good for automated server control, maybe a way to check if the rules are enforced? (Such as no TNT placement or destruction of other's buildings -- maybe can integrate with BigBrother?) But then it may make this plugin too complicated.
  14. Offline


    BigBrother in my mind had too much setup and config that made it confusing,
    On the other hand, this is a handy little plugin I would hate to see be intergrated with that because it would just confuse the whole thing. Maybe request a seperate plugin?
  15. Offline


    The Login message dosent work.
    AllowChat: false
    AllowBuild: false
    LoginMessage: Please use /rules to view the rules. You must accept them to build.
    ShowOnLogin: true
    MessageColor: '&b'
    EDIT: It does now, just needed to delete my player stuff++.
    A bug too: Rules wasnt created auto.
  16. Offline

    The PC Tech Guy

    Ya, it'd probably turn it into another plugin. As for BB implementation, it would basically check if a person is excessively modifying another's blocks, which BB logs. It could then ask the player, if he/she is online, that a person is messing around with their blocks/house/etc., do you allow this? And then they could say /yes or /no or something like that. If they're offline, it would either disable the griefer or kick them.
  17. Offline


    This doesn't seem to be working for me. When i run the server client this error appears:

    [SEVERE] BLOCK_PLACED loading Rules v.1a (Is it up to date?)
    java.lang.NoSuchFieldError: BLOCK_PLACED

    Plus a bunch of other random lines. When the player enters the server, they receive the message. When they type /rules, the rules appear. But they can build, chat, and everything. My settings are:

    AllowChat: false
    AllowBuild: false
    LoginMessage: Please use /rules to view the rules.
    ShowOnLogin: true
    MessageColor: '&b'

    I also have WelcomeMe and SpawnX

    Any suggestions?
  18. Offline


    The error message shows up on startup? Could you send me the rest of the lines of the stack trace that follow these two please?

    My main focus was for automated whitelisting, I have no intentions at this moment to try to integrate features that can be obtained from other plugins like BigBrother or WorldGuard. I am working on other larger projects that may be of use, those are still in the beginning phases and may not be out for a while.

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


    14:59:27 [SEVERE] BLOCK_PLACED loading Rules v.1a (Is it up to date?)
    java.lang.NoSuchFieldError: BLOCK_PLACED
    at net.codej.rules.Rules.onEnable(
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(
    at net.minecraft.server.MinecraftServer.e(
    at net.minecraft.server.MinecraftServer.a(
    at net.minecraft.server.MinecraftServer.d(
  20. Offline

    The PC Tech Guy

    I know, I was just suggesting something for having the rules enforced. As you already know, just accepting the rules doesn't prevent any griefers.
  21. Offline


    This is not necessarily an anti-griefing plugin. It is just for requiring the acceptance of the rules prior to using a server. It seems most servers have their rules posted on their website and require a user to go there to accept the rules prior to using the server, this alleviates the bouncing around. It will more than likely get assimilated into a larger project that I am working on, but I thought I'd let people play with it and see if anyone else finds this useful

    Thanks, I will look into the code. What version of CraftBukkit are you using?

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


    ummm 584? I think
  23. Offline


    There should be a line similar to :
    2011-03-18 10:09:48 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-487-g108eceb-b484jnks (MC: 1.3)

    you can look in server.log or scroll up in your console. In this example it would be 484.
  24. Offline


    Then I was right. Version 584
  25. Offline


    It looks like a bug in CraftBukkit as far as I can tell. I will continue researching to see if I need to change the handler or if they are attempting to fix. If you have no need for 584, the last recommended build of 556 does work. It seems to break at build 560.
  26. Offline


    I downloaded CraftBukkit build 556 and it works perfectly. Now I have another problem. I won't bother you with it because it isn't "rules" related
  27. Offline


    hmm question.

    where do we actually add the rules ?

    also can u support essentials /rules instead. To do this all you have to do is check when the user has actually type /rules and accepted.

    It might work this way already not sure but if does not can you please make it this way by checking /rules I mean it does not check with any plugin but only that the user has typed /rules, You could get this info by hooking into the command the user has typed as it logs to console.


    NVM just found the rules.txt tho my other idea is still welcome
  28. Offline


    This plugin is completely separate from essentials. This plugin utilizes /rules and /acceptrules functions that it handles itself.
  29. Offline


    Yea I understood that lol, I was asking if your could get it running with essentials as well to hook into into its rules command. Not really a big deal I just moved the rules from there to yours :), This is still amazing, Oh boy did I tire of whiners and people that obviously could not read or did not read a single line of a whole paragraph for there own benifit then carry on helplessly as the Admin team choose not to respond to it and just said the information is there read it.

    You deserve praise my friend, This is with out a doupt the most usefull tool an admin can have when it comes to dealing with your server crowd, Simple but very effective.

    Why is it so effective you might as its simply a an accept the rules plugin, Well I will tell you.

    As an administrator you and your staff have essentially an obligation to provide a fair system "unless otherwise stated" much like a terms of use policy, for servers RULES are the terms of use at least for good servers who really do care.

    The fact that somone accepts these rules and you have the ability to check with 100% accuracy that they have indeed accepted the information the rules provide, Even if they read them or not and you find them breaking such rules or asking question that they would otherwise KNOW if they read them, it gives you the server owner sufficent cause to make an alligation that if you choose is needed to remove that player from your server with complete peace of mind.

    Knowing that you were within your rights to do so and that the player had no reason to complain about it as reading the rules that should brefily outline important NEED to know facts and in my case a link back to and extended source of information would have let any player know exactly what is expected as far as how they play on your server.

    YES I understand that you dont really need ANY reason to do anything it is your server I know this, I'm simply saying that any person with some good will in them and respect would fell terrible if they humilated or banned and innocent player.

    That is why I think this plugin even tho its simplicity is one of the best I have seen so far. Thanks to this I can finally actually play my server with out naggers, everyone needs that one thing that puts the them at ease when administrating something for me that was this plugin.

    I have BB and nocheat and worldguard but they dont calm the nerves when it comes to naggers this does as I know that anyone able to build has agreed to my terms so I can totally ingnore anything that they should otherwise know about.

    Fuck that was totally an essay sorry :(
  30. Offline


    haha, well I appreciate it :-D I wasn't quite sure what you were asking, but i see a potential conflict. I will look into the essentials plugin and see if I can work anything out. Thanks!

Share This Page