- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register








The script repo is an archive of historical scripts. For modern scripts, or to post your own, please use the Scripts forum section.





ChatClearCommand


By BloodEko
Created: 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 script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
3000

ChatClearCommand:
  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