Currently the ReplayMod is banned on quite a few servers. This is due to the fact that the user can move freely through the world. By allowing a server to place restrictions on a replay it might be allowed on more servers. It might also be useful to allow players to add (not remove) these restrictions to any of their replays in the Replay Viewer.
To prevent new restricted replays from being opened in an older version or a replay viewer which doesn't support restricted replays, a Disconnect packet is inserted in the replay. Any replay viewer may only remove this disconnect packet when it fully supports restricted replays or wants to display a custom failure screen.
The disconnect message should be Please update to view this replay.
(otherwise the packet is ignored). The packet may be sent at any point in time and (obviously) has to be inserted manually by the recorder, not the server. There is nothing else a replay recorder has to do except inserting this packet whenever it encounters a Plugin Message with the specific channel (see next paragraph).
Replay restrictions are sent by the server via Plugin Message packets on channel Replay|Restrict
. Once set a restriction is active until the replay ends or it is manually unset via a second Plugin Message.
First the name of the restriction is sent as a String (maximum length of 64 characters), it is followed by a Boolean indicating whether it is activated (true) or deactivated (false), finally options specific to the restriction are sent. This is repeated as long as bytes are left.
For all data types see here.
If a restriction name is unknown or not supported by the replay viewer it must refuse to play the replay (it may notify the user that they should look for an update). Once defined, neither the format of the options nor the purpose of a restriction may change. It can however be extended by changing the restriction name (e.g. by appending _v2
to the name).
Restriction Name | Arguments | Description |
---|---|---|
no_xray | None | Show suffocation screen when in solid block |
no_noclip | None | Disable the ability to fly through blocks |
only_first_person | None | The camera may not leave the first person view (this should be used with no_xray in case the player clips into blocks) |
only_recording_player | None | Same as only_first_person except that changing the view to another player is also forbidden |
hide_coordinates | None | Hides the coordinates from the F3 screen |
Imagine you wanted to add a restriction that'd restrict the distance the camera can move away from the recording player or allow the player to spectate only themselves and some other players. That's what arguments are for.
Very good idea. I don't understand why people are concerned about the mod when you could just download the world (http://lmgtfy.com/?q=Multiplayer+World+Downloader+Mod). Anyways hopefully that allows it on more servers.