Creating the /mutechat command
In this step, we'll write the command for the mute chat script.
Last updated
Was this helpful?
In this step, we'll write the command for the mute chat script.
Last updated
Was this helpful?
To begin, we must create the command to mute the chat. This command can be anything you want, but for this tutorial, we'll use /mutechat.
When you've finished creating the command, we'll check to see if it's a staff member or a regular player. We'll use the "Has Permission" element for this.
We must now set up the true and false statements. To make things easier, I've separated the true and false statements into separate tabs.
When he has the permission, we will allow him to lock the chat. To accomplish this, we'll use the "Store Variable (String)" element to save a variable.
You can select different values, but you must remember them because they are required by the mute-chat script.
Once we've created the save variable, we'll send a message indicating that the chat is locked to the person in question. The message can be whatever you want it to be.
Following that, we will send a message to all of the players on the server.
We want to make it so that people with the bypass permission get a message saying that the chat has been muted by... but also that you have the bypass permission and can still talk. We will take the following steps to accomplish this.
Get Player Name (From the command sender)
Send Player Message (To every player)
Has Permission
True
False
Using the "Send Player Message" element, we will send a message to the people who have that permission (Screenshot down below)
In the false statement, do nothing.
After you've completed both the True and False statements, you can move on to creating the /unmute command.