PerWorldRules icon

PerWorldRules -----

Sets up /rules that are unique to each world




Added a variable, %time%, that can be used in messages.rules-wait-to-accept. So could you make the message like

'&cYou cannot accept the rules that fast! You can in %time%'

The time wording can be localized in the config. See the documentation tab for details.
----------, Jan 18, 2023

The config pathing for acceptance delay has changed. Now instead of a global for all worlds being config.accept-delay-post-read, the default for all worlds is config.accept-delay-post-read._default_. If you want a different delay on a specific world, you can do config.accept-delay-post-read.worldname.

Similarly, the /rules cfg delay command now has a world requirement to be set after the delay value.
----------, Jan 17, 2023

You can link worlds so rule acceptance in one applies to all the linked ones. See the docs for how to use it.
----------, Jan 12, 2023

You can now do /rules cfg delay (value) to set the delay required for acceptance post reading
----------, Oct 12, 2022

I really need to do more testing before posting an update, lol. I realized I had forgotten to include the ability to insert lines in existing rules when using the line based 1.12- editing system.
----------, Oct 10, 2022

I realized today when adding other features that the rules editing was broken for 1.12 and older. I had been testing on 1.19, so I didn't notice. Apparently Material.WRITEABLE_BOOK isn't valid before 1.13.

So I added a flag so it can detect if it's on 1.12 or older, and then the edit command will use a line number based system like the original version. See the documentation tab for details.
----------, Oct 10, 2022

I forgot to make a separate permission node for the ability to accept rules on another's behalf. Added that (perworldrules.accept.others)
----------, Oct 10, 2022

To accept for others, do /rules accept playername worldname to accept for that world. If you want there to be a delay between reading rules and accepting, set the number of seconds in config. If you wanted a 10 second delay for example, you'd do:
Code (Java):
config :
  accept -delay -post -read : 10
----------, Oct 10, 2022

One thing that bugged me was that if a player got a rules book, and they didn't use it immediately then another user got one and made a change, the first player's book would still have the old content and when they use it, it'd overwrite the second user's changes.

So now I made it such that when you open a PWR book, it validates that the book has the current rules. If not, it closes the book and reissues a new one. I'd have preferred it to just update itself then open with the latest, but apparently changes made to a book during PlayerInteractEvent do not actually take place for that specific interaction - rather, after it. So the only thing I can do is close the opened book then issue an update and inform the player.
----------, Aug 30, 2022

Made a mistake in the help processor, updated.
----------, Aug 28, 2022

At the request of a user, I added the ability to restrict peoples' actions until they accept the rules
----------, Aug 28, 2022

Overhauled editing to use the book interface. Much easier. Also rewrote a lot of the code as this was an old codebase. Changed some permissions around, you'll likely need to check your permissions if you upgrade from an older version. Check the documentation tab for details.
----------, Aug 24, 2022

Fixed an index bounds check bug
----------, Sep 25, 2019

The system for worlds with no rules has been overhauled. Now there are global rules and default rules in addition to world rules. If a world has no rules, it will display default rules if such exist. On any world, global rules will be displayed if such exist.

Also fixed the lack of tab completion for the subcommand section (append, set, insert, etc).

Also changed the old global * designation to _global_. Yea, it's more of a PITA to type, but the world tab complete will now put _global_ and _default_ at the top of the list to make it simple.
----------, Sep 25, 2019

The system for worlds with no rules has been overhauled. Now there are global rules and default rules in addition to world rules. If a world has no rules, it will display default rules if such exist. On any world, global rules will be displayed if such exist.

Also fixed the lack of tab completion for the subcommand section (append, set, insert, etc).

Also changed the old global * designation to _global_. Yea, it's more of a PITA to type, but the world tab complete will now put _global_ and _default_ at the top of the list to make it simple.
----------, Sep 25, 2019

Resource Information
Author:
----------
Total Downloads: 624
First Release: Sep 22, 2019
Last Update: Jan 18, 2023
Category: ---------------
All-Time Rating:
3 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings