Warzone / mars

All-in-one plugin for PGM servers
GNU Affero General Public License v3.0
9 stars 3 forks source link

Configurable triggerable events for broadcasts #15

Open TBG1000 opened 2 years ago

TBG1000 commented 2 years ago

Issue:

Broadcasts are only governed by a time interval and cannot be triggered by events, but only by executing commands.

Background:

Broadcasts in TGM allowed server administrator to configure several events that triggered a broadcast.

Such events are no longer available with Mars.

Desired solution:

Server owners should be able to specify some event(s) that will trigger the broadcast(s). Lack of the events property would mean the broadcast is just periodically sent in accordance with the fixed global interval.

Some events extracted from TGM:

Example config:

- name: broadcastOnJoin
  message: This broadcast is sent every time you join the server!
  events: onJoin # Broadcast is sent to the player every time they join the server

- name: epicBroadcast
  message: This broadcast is sent every minute, but also when you first join the server!
  # This broadcast is sent when the player first joins the server, 
  # then periodically (every 1 minute according to the global broadcast interval)
  events: onFirstJoin, interval

Affected areas / files: