PGM icon indicating copy to clipboard operation
PGM copied to clipboard

Pause Button

Open Picajoluna opened this issue 5 years ago • 3 comments

Something like a /pause command that completely freezes every aspect of the match would be really neat to have, and could prove especially useful in tournament situations.

Some actions that would need to be canceled or disabled (off the top of my head):

  • Entity damage (gamemode 1 everyone?)
  • Entity movement (mount players?)
  • All block interaction (breaking/placing)
  • Projectile shooting
  • Potion effects (should be paused somehow, or the values at pause time should be stored and reapplied to players upon match resume)
  • Item drops / pickups
  • GUI interactions
  • Items Spawners
  • Water/lava flow (subset of entity movement?)
  • TNT ignition / explosion (not entirely sure what this looks like -- if a lit tnt block is ignited after the pause begins, it blows up with entity/block damage canceled?)
  • Falling blocks (No clue how this would be handled -- probably leave them be?)

You'd also (of course) need to pause the match timer, as well as have a chat/bossbar message along the lines of "Game paused" (and translations strings etc). I suppose /resume (or doing /pause again) would be the way to resume the match.

A bonus would be implementing relogging for this as well. If a player disconnects and reconnects during the pause, they're placed exactly back where they were (upon doing /join). This feels like a decently big feature but I didn't see a ticket for it yet so I thought I'd make one.

Picajoluna avatar Jul 14 '20 22:07 Picajoluna

I just realized that the /freeze command handles player movement, projectiles, and block interaction. We'd still need to resolve the other points above too.

Picajoluna avatar Jul 15 '20 00:07 Picajoluna

All Tickables does also need to be handled somehow

KingOfSquares avatar Jul 19 '20 11:07 KingOfSquares

I think the pause in movement would be the big issue, anyone or anything moving would not maintain its velocity.

Pugzy avatar Jul 19 '20 19:07 Pugzy