PixelAutoMessage send messages to all players on configured time with all JSON events available on SpongeAPI.
This is a simple plugin to send messages to all players online.
The only comand is:
Command: /pam reload
Permission: pam.cmd.reload
All the configuration is commented to be easy to configure (yes, theres a lot of options).
#Configuration file:
To add more messages, copy the section “0” and paste changing the section to “1”, and increase this number for each new section.
configs {
interval=60
prefix="&7[&aAutoMessage&7]&r "
random=false
}
# Set you messages here! Follow the example and add numbers as index for more messages.
# All fields (except permission) accept the player placeholder {player}.
#
# Note: Use the fields 'click-cmd', 'click-url' and 'suggest-cmd' one at time.
messages {
"0" {
# Any colored message to send to server
a-message="&aThis is the default message. &6Change me now {player}!"
# Players online needed to show this message. Set 0 always show.
b-players-online=0
# Set permissions needed to player receive this message. Leave blank to disable.
c-permission=""
# Colored hover message.
d-on-hover="&7Hi {player}, i am a hover message!"
# Print a command on player chat.
e-suggest-cmd="msg {player} private message to me?"
# Command to run on click.
f-click-cmd="say Commands work {player}!"
# Open a url on click.
g-click-url="http://google.com"
}
}
Great plugin! Would you be able to add a configuration for how many messages need to be sent in chat by players before an announcement is posted? That would prevent announcements from being too spammy.
Hmmm… Currently I have cron jobs to run messages and commands on the server, during scheduled times. But this seems significantly more practical.
Have several suggestions for this plugin:
Any way you can add intervals for each message, I have a vote message I don’t want to annoy the players with, so I run it every 6 hours. While I have a “Removing entities” message running every 30 minutes.
Add a way to run commands during certain intervals, would be very useful. Like, a command that clears entities and whatnot.
Add ability to “delay” a message/command from running. So, if I have a “Removing entities” message going out, I would want to delay the command by 30 seconds to give players a warning.
(Alternatively using something like cron jobs’ timing would be neat. * * * * *, where each asterisk being a different measurement of time. [Minutes] [Hours] [Days] [Month] [Day of the Week] That way if I have scheduled events every Wednesday at 4am system time I would do 0 4 * * 3 “say Event is starting”)