ChatClearCommand
By
BloodEkoCreated: 2018/05/31 22:46:04 UTC-07:00 (6 years and 207 days ago)
Edited: 2018/06/02 21:21:04 UTC-07:00 (6 years and 205 days ago)
Likes: 0
Denizen Version: mc 1.12.2
Script Version: 4
Description:
This adds a command to your server which clears the chat, just for you or for everyone.
own chat: /cc
global chat: /cc g
global chat: /cc g 100
You need the permission: chatClear.admin
Download script |
View raw scriptChatClearCommand:
type: command
name: cc
permission: chatClear.admin
script:
- choose <context.args.get[1]||null>:
- case g:
- if <context.args.get[2]> matches number {
- define lines <context.args.get[2]>
}
- if <def[lines]||40> > 300 {
- narrate "<&4>ERROR Large number detected!"
- queue clear
}
- repeat <def[lines]||40> {
- announce ""
}
- narrate "<&a><player.name> cleared the global chat."
- default:
- repeat 40 {
- narrate ""
}
ChatClearMetrics:
type: world
events:
on system time hourly:
- webget "http://stats.denizenscript.com/tracker?script=140&version=1&players=<server.list_online_players.size>"
View History