A simple plugin that bans any non-operator players that ask for OP or say any other statement of your choosing.
Click the "Download Now" for the 1.18 version, or go to "Version History" to download the 1.16 or 1.17 versions.
Place the .jar file into your plugins folder, then startup the server to initiate the plugin, then stop the server and change the config file however you like.
This plugin will automatically check Spigot for new releases and notify any operators who join the server
Code (YAML):
Announce Plugin: true
Ignored Characters: ''
Ignore Non-Alphabetic Characters: true
Separate The Values By: ','
Bannable Messages: can i have op?
Delete Bannable Messages: false
Log Deleted Messages: true
OP Asked: Why are you asking for OP???
Ban Time: 3600000
Ban Message: Be patient. You have been banned for one hour.
Kick Message: Don't beg. You have been banned for one hour.
-
Announce Plugin:
Whether the plugin will send a message to players on join
Accepted values: true, false, op
-
Ignored Characters:
What characters to ignore in players' messages.
Accepted values: any YAML-approriate characters
-
Ignore Non-Alphabetic Characters:
Whether to ignore characters that are not in the alphabet.
Accepted values: true, false
-
Separate The Values By:
What char to separate the next config's messages by
Accepted values: a single Unicode character
-
Bannable Messages:
Messages that, when sent by the player, will cause the player to be banned. Capitalization does not matter. ! and # will automatically be filtered out of player-sent messages.
Accepted values: Sentences separated by the above Unicode character
-
Delete Bannable Messages:
Whether the plugin should delete messages defined in the config above before they are sent to other players
Accepted values: true, false
-
Log Deleted Messages:
Whether the plugin should log deleted messages to the console. Only matters if deleteBannableMessages is set to true
Accepted values: true, false
-
OP Asked:
What message should be sent to OP players who send bannable messages
Accepted values: Any string of characters, or '' if blank
-
Ban Time:
How long the ban will last, in milliseconds
Accepted values: Any positive integer
-
Ban Message:
What message the player will be sent when attempting to rejoin the world
Accepted values: Any String of characters
-
Kick Message:
What message the player will be sent when initially ejected from the world
Accepted values: Any string of characters
/status (/opaskban:status)
This command will return a message saying "This plugin is working" followed by another message saying whether or not your plugin is up to date
/config (opaskban:config)
This command can be used to change the Bannable Messages config from in game without root access
Usage:
/config get
Returns the current Bannable Messages
/config [set|overwrite] "Message"
Writes "Message" into the config
/config [add] "Message"
Appends "Message" to the config
/config [remove] "Message"
Removes "Message" from the config
Permissions:
OPAsk.op - Operators will have this permission. Anyone with this permission can use /config and /status
OPAsk.bypass - Operators will have this permission. Anyone with this permission can send "Bannable Messages" without being banned