Jump to content

Staff Chat + Clear Chat (Simple + Efficient)


PureEditsOYT

Recommended Posts

command clearchat:
    description: Clear chat for all players
    aliases: cc
    permission: cc.clear
    trigger:
        loop 300 times:
            broadcast " "
        broadcast "&6&m-----------------------------------------"
        broadcast "&b&lChat has been cleared by %player%!"
        broadcast "&6&m-----------------------------------------"
 
command staffchat [<text>]:
    aliases: sc
    trigger:
        if player has permission "staffchat.use":
            if arg-1 is not set:
                send "&a&fUse: &c&l/staffchat&f (message)"
            if arg-1 is set:
                loop all players:
                    loop-player has permission "staffchat.view":
                        send "&8[&bSC&8] &6%player%&8: &f%{_msg}%" to loop-players
        else:
            send "&cYou don't have permissions" to player

Information:

Main account for Zones RPG.
If you need anything PM this account for support.


Owned by: @Infiniticy

Link to comment
Share on other sites

This is great! Only thing is that lunar bypasses clearchat (you can just scroll up to see what was in chat before it was cleared) and on lunar and other clients if stacked messages are enabled, it will just say

"                                                      x300" and previous messages will still be there.

I also agree with the staffchat toggle thing, as it can get annoying to always type /staffchat. There is no fix to my knowledge about the lunar thing

 

imgonline-com-ua-resize-CNNkL1drx5M-removebg-preview.png.d6a8ae8b5eb862005fb056c21f934200.png

Link to comment
Share on other sites

16 hours ago, PureEditsOYT said:
command clearchat:
    description: Clear chat for all players
    aliases: cc
    permission: cc.clear
    trigger:
        loop 300 times:
            broadcast " "
        broadcast "&6&m-----------------------------------------"
        broadcast "&b&lChat has been cleared by %player%!"
        broadcast "&6&m-----------------------------------------"
 
command staffchat [<text>]:
    aliases: sc
    trigger:
        if player has permission "staffchat.use":
            if arg-1 is not set:
                send "&a&fUse: &c&l/staffchat&f (message)"
            if arg-1 is set:
                loop all players:
                    loop-player has permission "staffchat.view":
                        send "&8[&bSC&8] &6%player%&8: &f%{_msg}%" to loop-players
        else:
            send "&cYou don't have permissions" to player

the clearchat command will spam console, instead you should use 'send " " to all players'

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Lifestealed | Minecraft Servers
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - Present

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...