Skip to content

Allow rounds to automatically restart on ending #18

@caseif

Description

@caseif

Flint should include a mechanism for continuous rounds, in which all arena state is reset upon the round ending and players remain in the round. Furthermore, an additional mechanism should be included to extend this to allowing the host server to be "dedicated" to the minigame.

Continuous mode

Continuous mode is fairly straightforward: upon a round ending, its state will be reset and the arena rolled back, but it will not be orphaned and players will not be removed. This will occur when the round ends naturally due to the timer expiring, and when the Round#end() method is invoked. In the latter case, this behavior may be overridden as described in the section below.

RoundEndParameter

This issue will introduce a new enum called RoundEndParameter, which will serve to override default behavior of the Round#end() command as well as supersede its single-arg variant. Subsequently, a new var-arg Round#end(RoundEndParameter...) method will be introduced to the API. In Flint 1.3, this enum will have three values:

  • DO_ROLLBACK
    • Indicates that the arena should be rolled back upon the round ending (default behavior)
  • SKIP_ROLLBACK
    • Indicates that the round should not be rolled back upon the round ending (default behavior if ConfigNode.ROLLBACK_ON_END is specified as false)
  • CLOSE
    • Indicates that players should be removed and the round should be orphaned (default behavior when not in continuous mode)
  • RESTART
    • Indicates that the round should be reset and restarted (default behavior in continuous mode)

Dedicated mode

Details to follow.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions