Home›Java›Mods›ChatRestrict
ChatRestrict
ModsJava

ChatRestrict

Java mod listed for Minecraft 1.18–1.19. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
ChatRestrict.png
Disable or Enable chat, book writing, sign placing, and command access for specific time periods for specific players. Bypass chat blocking schedules for specific groups like staff, donors, or verified players. Mute and Unmute all chat on demand.

Thanks to Owen1212055 for his help making this!

Uses:

Rules:
Rules are used to determine the condition in which a player may or may not be able to talk or send a command. Simply add new rule types to the rules.yml.

You can make more advanced schedules and restrictions with rulesets.

General Rule Logic:
In the config.yml, if you set the following option to "true", players will also not be able to place signs or write in books if they would also be blocked from chatting.
Code (YAML):
restrict-books-and-signs : false
Main Syntax
Each rule is given a name, type, and the parameters relating to that type. For example, this creates a rule named weekend-check which allows chat on Saturday and Sunday.

Code (YAML):
rules:
  weekend-check
:
   type
: "allowed_weekdays"
   week_days
: [ "SATURDAY", "SUNDAY" ]
Default rules.yml
This is the default rules.yml file which includes a ruleset (with two contained rules) and two other separate rules. With these default values, chat is allowed on every day of the week except between 11:59 PM and 12:00 AM. Three fake commands are also blocked, regardless of if the ruleset is true. The time between 3:39 AM and 3:40 AM has chat blocked, also regardless of whether other rules are true.

For example, if the server admin wanted they could add a "disallowed_commands" rule type to a ruleset, along with rules for specific times and days of the week, to restrict those commands on a specific schedule (unless the player has a bypass permission).
Code (YAML):

rules
:
  chat-allowed
:
   type
: "ruleset"
   rules
:
     chat-days
:
       type
: "allowed_weekdays"
       week_days
: [ "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY" ]
     chat-time
:
       type
: "allowed_timerange"
       time_min
: "0:00 AM"
       time_max
: "11:59 PM"
       zone
: "America/Chicago"
  command-blocklist
:
   type
: "disallowed_commands"
   commands
: [ "cr_comma", "cr_separated", "cr_list_of_commands" ]
  flipped-rule
:
   type
: "flip"
   rule
:
     type
: "allowed_timerange"
     time_min
: "3:39 AM"
     time_max
: "3:40 AM"
     zone
: "America/Chicago"
Types:
There are five types of rules which admins can create:
allowed_weekdays
Returns true if the current day of the week is in the week_days list.
Syntax
Code (YAML):
rules:
  my-cool-rule
:
   type
: "allowed_weekdays"
   week_days
: [ "MONDAY", "TUESDAY" ]
allowed_timerange
Returns true if the current time is within the provided timestamps.

Syntax
Code (YAML):
rules:
  my-cool-rule
:
   type
: "allowed_timerange"
   time_min
: "7:00 AM"
   time_max
: "8:00 PM"
   zone
: "America/Chicago"
disallowed_commands
Returns true if the command the player executes does not start with any of the provided commands.
Syntax
Code (YAML):
rules:
my-cool-rule
:
  type
: "disallowed_commands"
  commands
: [ "say", "tell", "msg" ]
flip
Flips the result of the rule provided in the rule section.
Syntax
Code (YAML):
rules:
  my-cool-rule
:
   type
: "flip"
   rule
:
     type
: "allowed_weekdays"
     week_days
: [ "MONDAY", "TUESDAY" ]
In this case, players are able to talk on days that are NOT Monday or Tuesday.

ruleset
Goes through the contained set of rules and will return true if all pass, or false if at least one of them fails. This is the base structure used in the configuration file.

Syntax
Code (YAML):
rules:
  my-cool-rule
:
   type
: "ruleset"
   rules
:
     my-cool-rule
:
       type
: "allowed_weekdays"
       week_days
: [ "MONDAY", "TUESDAY" ]
     my-cool-rule-2
:
       type
: "allowed_weekdays"
       week_days
: [ "SUNDAY", "MONDAY" ]
Permissions:
Commands:

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

ChatRestrict is a free Minecraft Java mod. Compatible with Minecraft 1.18, 1.19. Downloaded 78 times (via Spigot). Download it and open it directly in the game.

Explore more