Skip to content
Ben Anderson edited this page Jan 3, 2022 · 12 revisions

Permissions

Any player attempting to use the plugin should have the required permissions given by your permission manager of choice. The permissions can be found in the configuration file under settings with the base permission being set at settings.replay-permission.

See more information on permissions below:


List commands

If a player has the base replay permission, they will be able to view their allowed commands using /replay help. This help message is also configurable in config as invalid-argument.


Starting a replay

If a player has the base replay permission, they can start a replay with the command /replay start <radius> <time> where <radius> is the block radius around them where the events unfolded and <time> is how long ago they wish to start the replay from. The <time> argument supports four formats:

  • {NUMBER}s - number of seconds ago
  • {NUMBER}m - number of minutes ago
  • {NUMBER}h - number of hours ago
  • {NUMBER}t - a timestamp where {NUMBER} is either the seconds or milliseconds since Unix Epoch. See also replay timestamps.
  • {TIME/DATETIME} - a time or datetime that follows a parse-able format as described in parsing a time. Please note that timezones are not supported - the server's default timestamp will be used. If you wish to use a time/datetime with a specific timezone then you should first parse the time/datetime with the command /replay timezone {TIME/DATETIME} and start a replay with the resulting timestamp.

A speed argument may also be optionally passed to the command with the format /replay start <radius> <time> [speed] where [speed] is an integer (whole number). The default speed is 1 (meaning 1x speed). For example, if 2 was chosen as the speed then the replay would run at 2x speed.


Pausing a replay

Whilst a user is playing/watching a replay, the can pause it using the command /replay pause. This pauses the replay at its current point and stops rendering the events to the player.

Pausing a replay does not hide the NPCs or block changes that the viewer can currently see, it merely stops rendering events. The progress of the replay will not be lost. See also resuming a replay.


Resuming a replay

Whilst a user is playing/watching a replay and has paused it, they can resume the replay using the command /replay resume. This resumes the replay from the point it was paused at and begins rendering events again. See also pausing a replay.


Changing replay speed

You can dynamically change the speed of a running (or paused) replay using the command /replay speed <speed> where <speed> is an integer (whole number).

For example, if the replay started with a speed of 2 (2x speed) and you ran the command /replay speed 1 then the replay would run at 1x speed (half of the starting speed).


Skipping a replay

You can skip an amount of time of a running (or paused) replay using the command /replay skip <time> where <time> is in one of the following formats:

  • {NUMBER}s - number of seconds to skip
  • {NUMBER}m - number of minutes to skip

Replay timestamps

If a player has the base replay permission, they can get the current timestamp in Unix Epoch seconds at any time using the command /replay timestamp.

Command use cases:

  • If the player is currently viewing a replay, it will return the current timestamp in the replay.
  • If the player is not viewing a replay, then it will return the current timestamp - not the timestamp in a replay.

Parsing a date-time

A player can also parse a specified date-time into a timestamp by adding the formatted date-time as an additional argument to the command. This makes the command /replay timestamp [datetime] where [datetime] is the date and time to parse into a timestamp in the format specified in the configuration file as the timestamp-converter-format-datetime setting.

The default value of the timestamp-converter-format-datetime setting in the configuration file is yyyy-MM-dd/HH:mm:ss. The date and time are in the ISO 8601 extended date-time format, with date and time being separated by a forward-slash. An example of using the default format would be /replay timestamp 2021/10/23-18:54:00 - this represents the 23rd of October 2021, at the time 18:54 (54 minutes past 6pm).

Parsing a time

A player can also parse a specified time into a timestamp by adding the formatted time as an additional argument to the command. This makes the command /replay timestamp [time] where [time] is the time to parse into a timestamp in the format specified in the configuration file as the timestamp-converter-format-time setting.

This works exactly the same way as parsing with a datetime, however this parsing method just assumes that the day it is parsing is the current day.

The default value of the timestamp-converter-format-time setting in the configuration file is HH:mm:ss. The time is in the ISO 8601 extended time format. An example of using the default format would be /replay timestamp 18:54:00 - this represents the current day, at the time 18:54 (54 minutes past 6pm).

Parsing with a timezones

A player can also provide a timezone when specifying a date-time or time to parse. This is ideal when a player in a different timezone reports an event to the server admin and the admin must view the replay using the provided time and knowledge of the timezone.

This makes the command /replay timestamp [datetime/time] [timezone] where [timezone] is ideally in the format {area}/{city}, for example Europe/Paris or America/Los_Angeles. However, timezone abbreviations are also supported (but not encouraged), for example EST and PST. Furthermore, timezone offsets can also be used, for example (GMT-8 or GMT-08:00) and (GMT+2 or GMT+02:00).

It is also worth noting that the timezone is used to retrieve the current date if only a time was specified.


Reloading configuration files

If a player has the configuration reload permission (usually defined in the configuration file at settings.replay-reload-permission), they can reload the configuration file used by the plugin. This simply means the plugin refreshes the values it uses from the configuration file for things such as messages and most settings.

It is only recommended using the /replay reload command to reload messages in the configuration file. For settings, most of them won't be affected by reloading the configuration file - instead the server should be restarted.


Clearing logs

If a player has the permission to clear event logs (usually defined in the configuration file at settings.replay-clearlogs-permission), they can permanently delete all event logs stored in the MySQL database for InstantReplay by running the command /replay clearlogs.

Once the logs have been deleted, the data in them cannot be recovered. It is recommended to store occasional backups of the MySQL database used by InstantReplay if you wish to recover event data, in the case that the event logs are cleared. Therefore, it is advised that very few individuals are given the required permissions to clear the event logs.