- 7,280 views, 1 today
- 682 downloads, 0 today
209
Ever wanted to do awesome stuff that Essentials Chat or other plugins couldn't do?
Then this is the plugin for you!
There are a massive number of things that chatutilities can do including, but not limited to:
Then this is the plugin for you!
There are a massive number of things that chatutilities can do including, but not limited to:
- Add a replacement to a word (example, replace :) with a unicode character)
- Have per-replacement permissions
- Run commands when a word is replaced
- Add bundled commands (multiple commands in one command with a permission node)
- Disable chat in case of a spam attack
- Clear chat
- Loop commands multiple times
- Force someone else to say something or run a command
- Force a player to run a command as op
- Delay a command by a certain number of ticks
- Get the x, y, z, world, or uuid of any player in a command
- Ignore chat
- Replacements work in chat, commands, signs, books, and anvil renaming!
- When a player says a bad word, replace it with *'s and kick the player
- Use bundled commands and the delay to make a countdown timer from 10
- Spawn a firework at a players location when they say something
Installation
To install this plugin, download the zip file and extract it to your plugins folder.
There should now be a ChatUtilities.jar and a ChatUtilities folder inside of your plugins folder.
There should now be a ChatUtilities.jar and a ChatUtilities folder inside of your plugins folder.
Automatic adf.ly-ing
To enable this, you should have something like this in the config:
adfly:
enabled: true
link: api.adf.ly/api.php?key=YOUR_KEY_HERE&uid=YOUR_UID_HERE&advert_type=int&domain=adf.ly&url=$link
Just replace YOUR_KEY_HERE and YOUR_UID_HERE with those 2 values.
Now, whenever someone types a link in chat or in a command or even on a sign, it gets converted to an adf.ly link automagically!
Note: If you need to register for adf.ly, please use this link!
Thank you, it awards me 20% of what you make, but you still get full money too!
adfly:
enabled: true
link: api.adf.ly/api.php?key=YOUR_KEY_HERE&uid=YOUR_UID_HERE&advert_type=int&domain=adf.ly&url=$link
Just replace YOUR_KEY_HERE and YOUR_UID_HERE with those 2 values.
Now, whenever someone types a link in chat or in a command or even on a sign, it gets converted to an adf.ly link automagically!
Note: If you need to register for adf.ly, please use this link!
Thank you, it awards me 20% of what you make, but you still get full money too!
Commands and Permissions
Command | Description | Permission |
/chat clear | Clears the chat | ChatUtilities.globalClear |
/chat disable | Disables chat for all players without the permission "ChatUtilities.anti-disable" | ChatUtilities.disable |
/chat enable | Enables the chat after a disable | ChatUtilities.enable |
/chat ignore | Ignore chat from everyone without the permission "ChatUtilities.anti-disable" | ChatUtilities.ignore |
/chat reload | Reloads the config | ChatUtilities.reload |
/chat chat (player) (message) | Send a chat message from the specified player. Works with commands by putting a / in front of the message. | ChatUtilities.chat |
/chat delay (delay in ticks) (command) | Runs the proided command from console after the delay. | ChatUtilities.delay |
/chat loop (amount) (delay) (command) | Runs the provided command from console however many times you say, with a delay between each command in ticks. You can use $current in the command and it will be replaced with the number that it is on. | ChatUtilities.loop |
/chat asop (player) (command) | Forces the player to runn the command as if they were an op. | ChatUtilities.asop |
/chat sync (command) | Used only in replacement commands, runs the command from console as a task after the replacement happens. | ChatUtilities.sync |
/chat tell (player) (message) | Tell a player a direct message without any formatting. If you leave the message blank, it will output a blank line to the player. You can also use color codes. | ChatUtilities.tell |
/chat cancel (delay id) | Cancels the id provided. The id will be the message you get when you execute a delay command. | ChatUtilities.cancel |
/chat package (package command and arguments) | Manually executes a package command. (Makes it work in command blocks) | ChatUtilities.package |
Preset Replacements
These are things that are replaced with values if you have the permission of "ChatUtilities.functions".
These work in chat and in commands.
Just put a players name in the parentheses.
These work in chat and in commands.
Just put a players name in the parentheses.
Function | Description |
!XOf() | Replaced with the x value of the player |
!YOf() | Replaced with the y value of the player |
!ZOf() | Replaced with the z value of the player |
!WorldOf() | Replaced with the name of the world that the player is in |
!UUIDOf() | Replaced with the UUID of the player |
Configuration
Before we start, if you do not have notepad++, I highly reccomend you get it.
You can find it here.
Never use tabs in this plugin's configuration, go into Settings->Preferences->Tab Settings and check the "Replace by space" box.
Package Commands
To add a packaged command, put the command that you want under the PackagedCommands key. (dont put a '/')
Then add the permission and minArgs nodes. (If you dont want arguments in your command, set minArgs to 0)
After that, add a list of commands that you want. (You can use $player for the name of the player and $(insert number here) for that argument.
You are now all done with adding your package command.
Remember that all of the commands in it are run by console!
Replacements
To add a replacement, put the word you want replaced under the replacements node.
Replacements work in chat, commands, and even on signs!
Then add the replacement, permission, and replaceAll nodes.
(If you don't know what replaceAll is for, imagine this: There is a replacement to replace 'i' with 'I'. If replaceAll was false, then a message would look like this: "I like cake." if it was true, it would look like this: "I lIke cake." replaceAll when its false only replaces the word if it stands alone.)
Then add the commands. If you put "cancel" for the command, it will cancel the event. You can use $player and it will be replaces with the players name. These commands are run from console and executed before the chat message is displayed.
To execute the command after the message is displayed, use the "chat sync (command)" command.
Taa daa, all done!
There are a lot more possibillities here, for example:
You can find it here.
Never use tabs in this plugin's configuration, go into Settings->Preferences->Tab Settings and check the "Replace by space" box.
Package Commands
To add a packaged command, put the command that you want under the PackagedCommands key. (dont put a '/')
Example
PackageCommands:
test:
test:
Example
PackageCommands:
test:
permission: MyPermission.test
minArgs: 0
test:
permission: MyPermission.test
minArgs: 0
Example
PackageCommands:
test:
permission: MyPermission.test
minArgs: 0
commands:
- chat chat $player Hello!
- chat delay 20 chat chat $player This is one second later!
test:
permission: MyPermission.test
minArgs: 0
commands:
- chat chat $player Hello!
- chat delay 20 chat chat $player This is one second later!
Remember that all of the commands in it are run by console!
Replacements
To add a replacement, put the word you want replaced under the replacements node.
Replacements work in chat, commands, and even on signs!
Example
replacements:
firework:
firework:
(If you don't know what replaceAll is for, imagine this: There is a replacement to replace 'i' with 'I'. If replaceAll was false, then a message would look like this: "I like cake." if it was true, it would look like this: "I lIke cake." replaceAll when its false only replaces the word if it stands alone.)
Example
replacements:
firework:
replacement: ooh, ahh!
permission: MyPermission.firework
replaceAll: true
firework:
replacement: ooh, ahh!
permission: MyPermission.firework
replaceAll: true
To execute the command after the message is displayed, use the "chat sync (command)" command.
Example
replacements:
firework:
replacement: ooh, ahh!
permission: MyPermission.firework
replaceAll: true
commands:
- chat sync chat chat $player I like fireworks!
firework:
replacement: ooh, ahh!
permission: MyPermission.firework
replaceAll: true
commands:
- chat sync chat chat $player I like fireworks!
There are a lot more possibillities here, for example:
Make something only work in an anvil
replacements:
'&0':
replacement: §0
permission: Something.that.the.player.doesnt.have
anvilPermission: ChatUtilities.anvilColor.0
replaceAll: true
'&0':
replacement: §0
permission: Something.that.the.player.doesnt.have
anvilPermission: ChatUtilities.anvilColor.0
replaceAll: true
Spawn a firework
replacements:
firework:
replacement: ooh, ahh!
permission: MyPermission.firework
replaceAll: true
commands:
- chat sync chat asop $player summon FireworksRocketEntity ~ ~ ~ {LifeTime:20,FireworksItem:{id:401,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Flicker:1,Trail:1,Colors:16711680],FadeColors:[5441159]}]}}}}
firework:
replacement: ooh, ahh!
permission: MyPermission.firework
replaceAll: true
commands:
- chat sync chat asop $player summon FireworksRocketEntity ~ ~ ~ {LifeTime:20,FireworksItem:{id:401,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Flicker:1,Trail:1,Colors:16711680],FadeColors:[5441159]}]}}}}
Kick a player for a bad word
replacements:
BadWord:
replacement: '****'
permission: ChatUtilities.badword
replaceAll: true
commands:
- chat sync kick $player Swearing is not allowed
BadWord:
replacement: '****'
permission: ChatUtilities.badword
replaceAll: true
commands:
- chat sync kick $player Swearing is not allowed
Have cool symbols in chat
replacements:
:):
replacement: ☺
permission: ChatUtilities.replacement.happy
replaceAll: true
(phone):
replacement: ✆
permission: ChatUtilities.replacement.phone
replaceAll: true
:):
replacement: ☺
permission: ChatUtilities.replacement.happy
replaceAll: true
(phone):
replacement: ✆
permission: ChatUtilities.replacement.phone
replaceAll: true
Regex
Regex can be used in for more advanced replacements.
To use regex in your replacements, be sure to have "replaceAll" set to true.
Then, it should look something like this:
' \E regex here \Q':
replacement: it works!
permission: none
replaceAll: true
So, for example:
'\Ea+\Q':
replacement: it works!
permission: none
replaceAll: true
That would replace all a's and strings of a's with "it works!".
To test your regex, go here.
Just put "(?i)\Q" in front of your replacement and "\E" in back of it.
For example, to test the previous example, you would type this into the regex box:
"(?i)\Q\Ea+\Q\E"
Then, type whatever you want to test to see if it matches into the box below.
--For Advanced Users--
To get what a regex matched, use the $match variable in the replacement and commands.
Just double-parentheses whatever you want to match.
To use regex in your replacements, be sure to have "replaceAll" set to true.
Then, it should look something like this:
' \E regex here \Q':
replacement: it works!
permission: none
replaceAll: true
So, for example:
'\Ea+\Q':
replacement: it works!
permission: none
replaceAll: true
That would replace all a's and strings of a's with "it works!".
To test your regex, go here.
Just put "(?i)\Q" in front of your replacement and "\E" in back of it.
For example, to test the previous example, you would type this into the regex box:
"(?i)\Q\Ea+\Q\E"
Then, type whatever you want to test to see if it matches into the box below.
--For Advanced Users--
To get what a regex matched, use the $match variable in the replacement and commands.
Just double-parentheses whatever you want to match.
Progress | 100% complete |
Game Version | Minecraft 1.8.1 |
Tags |
24 Update Logs
Update #24 : by Techdoodle 01/31/2015 8:00:55 pmJan 31st, 2015
Yay, an awesome way better updater!
LOAD MORE LOGS
2980831
7
Create an account or sign in to comment.
Sub, Diamond, Like, Share, Favorite, My god man, I love this!!!
:)
InsertBadWordHere:
replacement: 'Alpaca'
permission: none
replaceAll: true