An extensible MUSH / MUD server written in Java.
Commands are what makes things happen in a Grounds universe, and many commands generate events describing what happens. Events on their own are invisible to players, but listener attributes on extensions can react to events by running plugins, which may in turn run more commands. This helps to make a universe feel more alive, beyond the players in it.
Every event has a type which describes what happened to trigger it. These are usually tied to the command that caused the event to be posted in the first place, but some events are not tied to a command.
Type | Command | Cause |
---|---|---|
ArrivalEvent | n/a | A player arrived (logged in) |
DepartureEvent | n/a | A player departed (logged out) |
DroppedThingEvent | DROP | A thing was dropped by a player |
SayMessageEvent | SAY | A message was said |
TakenThingEvent | TAKE | A thing was taken by a player |
TeleportArrivalEvent | TELEPORT | A thing arrived at a location |
TeleportDepartureEvent | TELEPORT | A thing departed from a location |
YoinkArrivalEvent | YOINK | A yoinked thing arrived at a location |
YoinkDepartureEvent | YOINK | A yoinked thing departed from a location |
Note: In Grounds, the MOVE command causes a TELEPORT, so ordinary player movement also triggers Teleport*
events.
Every event has a JSON object called a payload with context about the event, beyond the type. Each event type may have its own payload structure. The following fields are standard, but they are not necessarily present in every event.
Field name | Definition |
---|---|
location | name of location where event occurred |
locationId | ID of location where event occurred |
player | name of player who caused event |
playerId | ID of player who caused event |
Here are the payload fields provided by the different event types.
Type | Player | Location | Other |
---|---|---|---|
ArrivalEvent | arriving player | n/a | n/a |
DepartureEvent | departing player | n/a | n/a |
DroppedThingEvent | dropping player | dropping location |
|
SayMessageEvent | saying player | saying location |
|
TakenThingEvent | taking player | taking location |
|
TeleportArrivalEvent | arriving player | location of arrival | none |
TeleportDepartureEvent | departing player | location of departure | none |
YoinkArrivalEvent | not present | location of arrival |
|
YoinkDepartureEvent | not present | location of departure |
|