EasyRules

mainrules

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.

http://i1073.photobucket.com/albums/w393/TerraVerseMC/rulesexample.png

  • 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)\\

http://i1073.photobucket.com/albums/w393/TerraVerseMC/rulesexampleTF.png

[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\\

http://i1073.photobucket.com/albums/w393/TerraVerseMC/rulesexampleWW.png

Colors

Adding color.

example

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.

http://i1073.photobucket.com/albums/w393/TerraVerseMC/rulesexampleNOcolor.png

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.

http://i1073.photobucket.com/albums/w393/TerraVerseMC/rulesexamplecolor.png

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.

http://i1073.photobucket.com/albums/w393/TerraVerseMC/faq.png

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 must login to post a comment. Don't have an account? Register to get one!

  • Avatar of mrwigglez mrwigglez Jul 31, 2013 at 17:46 UTC - 0 likes

    Hello, long time user and fan of your script. I'm getting the same error that Cosalert was getting.

    [SEVERE] Could not pass event PlayerJoinEvent to EasyRules v2.1
    org.bukkit.event.EventException
    	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427)
    	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    	at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredListener.java:35)
    	at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
    	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
    	at net.minecraft.server.v1_6_R2.PlayerList.c(PlayerList.java:206)
    	at net.minecraft.server.v1_6_R2.PlayerList.a(PlayerList.java:102)
    	at net.minecraft.server.v1_6_R2.PendingConnection.e(PendingConnection.java:130)
    	at net.minecraft.server.v1_6_R2.PendingConnection.d(PendingConnection.java:43)
    	at net.minecraft.server.v1_6_R2.DedicatedServerConnectionThread.a(DedicatedServerConnectionThread.java:41)
    	at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:29)
    	at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590)
    	at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226)
    	at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486)
    	at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419)
    	at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
    Caused by: java.lang.NullPointerException
    	at me.fatmarley.easy.playerListener.onPlayerJoin(playerListener.java:62)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	at java.lang.reflect.Method.invoke(Unknown Source)
    	at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425)
    	... 15 more
    

    But my rules.txt has proper: joinmessage=&cREAD THE &a/RULES&1! prefix=&6RULES

    And such, Any idea on how to fix this?

    Last edited Jul 31, 2013 by mrwigglez
  • Avatar of jk1352412345 jk1352412345 Jun 02, 2013 at 15:09 UTC - 0 likes

    @googlebuscus: Go

    ok, i disabled it, deopped myself and made me a default but it still brings up the CB rules

    Last edited Jun 02, 2013 by jk1352412345
  • Avatar of googlebuscus googlebuscus Jun 02, 2013 at 12:28 UTC - 0 likes

    @jk1352412345: Go

    Read the plugin description, it tells you how to make ER compatible with CommandBook.

  • Avatar of jk1352412345 jk1352412345 Jun 02, 2013 at 05:09 UTC - 0 likes

    when i do /rules it brings up the normal CommandBook rules. how do i fix this?

  • Avatar of googlebuscus googlebuscus May 25, 2013 at 01:23 UTC - 0 likes

    What's the [main] tag for info.txt file? To change what pops up when a player just types, /faq..

  • Avatar of jkrmnj jkrmnj Apr 03, 2013 at 21:29 UTC - 0 likes

    Never mind, I figured it out. I needed to run the program as administrator since it was saved onto another account on my computer.

  • Avatar of fatmarleys fatmarleys Mar 28, 2013 at 08:23 UTC - 0 likes

    That means you are missing one of two parts. Either it is the join message or prefix.

    Please add this to the top of your rules file.

    • joinmessage=READ THE /rules
    • prefix=-

    Edit them as you please, but they need to be there.

    Last edited Mar 29, 2013 by fatmarleys

    "In the sky, there is no distinction of east and west; people create distinctions out of their own minds and then believe them to be true."

    The Buddha


    My Plugins: FatHunger FatGiants FatRaffle FatTP Easy Rules

  • Avatar of cosalert cosalert Mar 28, 2013 at 00:55 UTC - 0 likes

    having some error .Help ?

    08:51:46 [SEVERE] Could not pass event PlayerJoinEvent to EasyRules v2.1 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:462) at net.minecraft.server.v1_5_R2.PlayerList.c(PlayerList.java:205) at net.minecraft.server.v1_5_R2.PlayerList.a(PlayerList.java:101) at net.minecraft.server.v1_5_R2.PendingConnection.d(PendingConnection.ja va:129) at net.minecraft.server.v1_5_R2.PendingConnection.c(PendingConnection.ja va:44) at net.minecraft.server.v1_5_R2.DedicatedServerConnectionThread.a(Dedica tedServerConnectionThread.java:41) at net.minecraft.server.v1_5_R2.DedicatedServerConnection.b(SourceFile:2 9) at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:5 80) at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:2 25) at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:4 76) at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java :409) at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:5 73) Caused by: java.lang.NullPointerException at me.fatmarley.easy.playerListener.onPlayerJoin(playerListener.java:62)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:425) ... 14 more

  • Avatar of fatmarleys fatmarleys Mar 23, 2013 at 18:23 UTC - 0 likes

    if you send me the modified jar, sure.

    Last edited Mar 23, 2013 by fatmarleys

Facts

Date created
Mar 11, 2012
Categories
Last update
Mar 20, 2013
Development stage
Release
License
Public Domain
Curse link
EasyRules
Downloads
11,337
Recent files

Authors