TVPT / VoxelGunsmith

Equipping VoxelSniper. The API for the popular Long Range Terraforming plugin VoxelSniper.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Player History Buffer

Deamon5550 opened this issue · comments

A 'history buffer' is needed for all players. This history buffer will be a Stack of Change-queues. These Change-queues will be the Inverse Change-queues to the Change-queues flushed to the world by the player. All Change-queues within the history buffer beyond a configured size will be discarded upon the addition of a new Change-queue.

CommonPlayer.undoHistory(int n) should flush the most recent n Change-queues from the history buffer to the world they are from. This will have the effect of reversing previous changes performed by the player.

An implementation is needed for ChangeQueue.invert() for all currently implemented Change-queues.