EasyRules
EASYRULES is a simple plugin with no Permissions and one easy command /rules. By using txt file rather than a yaml, server admins can make changes to the txt file upload and see the changes immediately. No need to reload or restart.
There is just one simple command /rules
Rules.txt
Within the folder /plugins/rules is the rules.txt file. There 2 settings you can adjust.
- Joinmessage, which will broadcast a quick message to all users when they join
- Prefix, this is what will appear before all messages.
- Both of these settings support Color.
Categories
Categories are added by creating a tag, like so [towns] The main category is ironically [main] and is the default /rules category show when you enter /rules
Here is an example WITHOUT color
[main]List of pages: (usage: /rules <page 1-X> ) [main]Page 1: General - Main rules of this server. [main]Page 2: Building - Do's and Dont's. [1]~~~~~General rules of the server. [1]- No griefing / stealing [2]~~~~~Rules about building [2]- Realistic building, no floating buildings etc.
Doing /rules will show the main section
[main]List of pages: (usage: /rules <page 1-X> ) [main]Page 1: General - Main rules of this server. [main]Page 2: Building - Do's and Dont's.
Doing /rules 1 will show the General Section I created.
[1]~~~~~General rules of the server. [1]- No griefing / stealing
Hidden Categories
You are NOT limited to using Numbers for your categories. You can use Words as well, and they DO NOT have to me in the [main] category to work.
For instance, if you use TOWNY, you might want to allow each town to have their own set of rules. I have a town called WhiteWater and a town named terra firma.
If a player does /rules terrafirma this is what why will see
[terrafirma]~~~~~~ Terra Firma Town Rules\\ [terrafirma]- &eOnly the Best Builders may join this town.\\ [terrafirma]- &2You can build anywhere you like, just dont destroy &cANYTHING\\ [terrafirma]- &eThere is no spawn point, so make sure you set a home.\\ [terrafirma]!!!! &4Do Not Spawn Items for Building &f(if you are a mod)\\
[whitewater] No cobblestone or dirt houses. Try best to stay away from building completely plank houses or 1 material houses. \\ [whitewater] No greifing or annoying other players of the town.\\ [whitewater] &2Vote, &eVote &rand &cVote. Vote for the server as much as possible, I will like you more.\\ [whitewater] Listen to rule 1 and 2\\
Colors
Adding color.
NEW
- &n Underline
- &l Bold text
- &m Strike-through
- &k Same as &k
- &o Italics
When to use &f and &r
If you make a rule that uses a color and a font edit together and you want to keep the font edit, but not the color, then you should use &f
&6 &l THIS TEXT will be gold and bold.&f NOW it will be bold and white.
You can use &r to turn off the font edits
&6 &l THIS TEXT will be gold and bold.&r NOW it will be JUST white.
An example Without colors
[main]List of pages: (usage: /rules <page 1-X>) [main]Page 1: General - Main rules of this server. [main]Page 2: Building - Do's and Dont's.
An example With colors
[main]List of pages: &c(usage: &b/rules <page 1-X> &c) [main]Page &b1: &bGeneral - &6Main rules of this server. [main]Page &b2: &bBuilding - &6Do's and Dont's.
Example Config
If you would like to see my Config and work with it, feel free.
Important
You do not need to reload the plugin for changes to the rules.txt file to take place.
Edit the file, upload the file and it will APPEAR!
Using With CommandBook V2.0
If you want to use this with Commandbook, you will need to disable the rules function in Commandbook.
Like so....
components: disabled: - stored-messages
Stored-messages is where Commandbook rules are enabled. So if you disable it, you can use EasyRules instead.
FAQ
Version 2.0 has a new file called info. This is used for basic server info. The ingame command is /faq to make sure there are no conflicts with commandbook or essentials
Here is an example, which also shows the new characters. Please note that you CAN combine color and font codes.
Changelog
V2.1
- Standardize Colors
- YOU WILL HAVE TO UPDATE YOUR RULES FILE IF YOU USE THIS VERSION V2.0
- text wrap works correctly
- added new font codes
- added info.txt and /faq command
you have the rules file setup? You also have all the config options?
It's important that your rules.txt has these headings
joinmessage=Please read the rules (<-just an example)
prefix=ANYTEXT
[main]The rest of your rules file.
If it does, let me know and I will try to debug it more.
This is not a huge problem just a minor annoying one, I'm not sure what's causing it but here is the log - Pastebin Error - Every time time someone joins the server it gives that error message in the console, it doesn't seem to be messing anything up so its just annoying lol.
A 1.5 version has been released. I have fixed the textwrap issue as you can see in the picture above. As well I have added in some new font codes. You can now use bold, italics, strikethrough, special k and underline. You CANNOT use them in conjunction with colors...Minecraft limitation.
@Kalexer
Fixed the join message issue.
I getcha...I will look into adding that soon...
Would it be possible for you to code breaks in, so you can end a line wherever you want without showing [PREFIX] on the next?
Example:
Would give:
@Zierk sorry I have no experience with Essentials. @Mriskaaa the beauty of this plugin is that it NEVER needs updating.
Will this be updated? I love this plugin..
How do you get this to work if you have Essentials?
Is there a way to change the commands? I want it to be /info
I used to use EasyRules when Streammz maintained it, now I updated to this one and applied my old rules.txt
Everything works very fine, except the joinmessage.
It simply doesn't show up. I also get no errors from it in the log.
I altered it to something like "hello" to see if there's something wrong with the length or colors etc, but it didn't work either. Will use another motd-Plugin and only use the working part of EasyRules till it might get fixed. =)
Loved this plugin from day one.
maybe multi-prefix support?
@tehdansorz
remove it yourself
How do i get it to be like this??
[Moderator edit: link removed]
dident postevery photo but at next page is it standing
1.1
1.2
1.3
1.4
how can i get it to be like that ?
Nice plugin I like it
Too much [PREFIX] ! Please remove it !
@gabriel11798
Install easyrules..Paste THIS into your rules.txt file...do /rules ingame.
I need some professional help with this, as to me, it's not described clearly enough and I would like some help. If anyone's got time, PM me.
Could you release the source?
@graywolf336
Well you got AnCasino, so Thank you.
And I didn't change much other than update it, so ill look into the Sender issue.