来源 https://www.spigotmc.org/resources/automessage-1-7-1-19.103155/
you can disable sending messages when no one is on the server in config.yml
if you want use commands you need op or automessage.commands permissions
automessage.hide - players with this permission can't see auto-messages
There is the next commands in the plugin:
All that in <> its your variables that you need insert
Instead of /automessage you can use /am
- /automessage reload reloads the plugin config if you changed it by yourself
- /automessage createMessage <name> <delay> <text> create the new message with default type and sound values
- /automessage removeMessage <name> delete the exist message by name
- /automessage addTo <name> <text> adds the text to the existing message
- /automessage changeDelay <name> <delay> change delay to the message
- /automessage switchSound <name> <enabled/disabled> you can enable/disable the sound when message pop up
- /automessage setType <name> <default/random/player> set type of message for example you have three texts in config and if you choose random type the random string from list has been pop up. player send message to random player on the server
- "/automessage removeFrom <name> <text>" allows to delete string from message (sometimes can argue)
- "/automessage show <enabled/disabled>" works only with automessage.show permission and allows to disable the auto-messages to player
- /automessage enable/disable allows to enable/disable sending messages
- /automessage addRandomMessage <text> to add a message to the list from which the plugin chooses when and what to choose
- /automessage removeRandomMessage <text> to remove message from list of randomMessages
- /automessage addCommandTo <name> <command> to add a command that will be executed when sending a message
- /automessage removeCommandFrom <name> <command> to remove a command that will be executed when sending a message
- /automessage setConsole <name> <true/false> to enable/disable send messages to console
- /automessage <name> <world_name> if you want send messages in certain world ("all" it's all worlds)
- /automessage print <name> allows you to send message by name early
Variables:
- %player% - player nickname in message
- %tps% - server tps (sometimes not accurate)
- %deaths% - count of players deaths
- %kills% - count of player kills (only players kills)
- %mob_kills% - count of players mob kills
- %online_players% - display count of online players
- %max_players% - display count of server max players
- %posX% - player's position on X
- %posY% - player's position on Y
- %posZ% - player's position on Z
Fuctions:
- url{link, text, hover_text} (you can ignore text or hover_text) to send link in chat as a word or default message
- cmd{link, text, hover_text} (you can ignore text or hover_text) allows apply command ('/' needed) or send message on behalf of the player
for several reasons, if you want to insert '}' or '&' into the function text, you need to put '\' before the symbol: url{https://google.com/ , {go to google\}}.
Also you can:
- split messages by rows with '\n' (also you can create a separate list item)
- use tab (four spaces) to text with '\t'
- use quotes (" or ') to text with '\"' or '\''
- use '\\' to add '\'
Also you can set settings without commands in config file for example:
Code (Text):
test: # Name of the message
message: # List of the messages
- 'test '
delay: 5 # Delay
sound: enabled # turn on/off sound (Item pick up) when message pop up
type: default # type of message default/random/player
commands: # list of the commands
- 'time set day'
console: true # on/off console messages
world: world_nether # set the world of message (you can use "all" for all worldsthis code will send message "test" every 5 seconds in nether with sound and execute command
You can set delay to "10-20" and it starts send messages between 10 seconds to 20
文章评论