Skip to content

feat: add jail command - #3

Merged
spacebuilder2020 merged 1 commit into
ForgeEssentials:masterfrom
FatalMerlin:master
Mar 11, 2024
Merged

spacebuilder2020 merged 1 commit into
ForgeEssentials:masterfrom
FatalMerlin:master

Conversation

@FatalMerlin

Copy link
Copy Markdown
Contributor

Adds a jail command that:

/jail <player> [time]

  • Has permission group: commands.jail
  • Can jail players for a time between 1 and 15 minutes, defaults to 1 minute, if not specified
  • Teleports players to the given coordinates (edit in the file, first line)
  • Remembers the previous coordinates
  • Sets them to adventure mode
  • Plays sounds when moving player to jail
  • Plays sounds when moving player out of jail
  • Plays a short sound every minute to indicate progression of sentence
  • Shows title on screen with remaining time to serve
  • Provides tab completion for player names
  • Checks if target player is already jailed, preventing duplicate jailing, showing remaining time if already in jail
  • Has protections for not teleporting people in dimensions other then the overworld (1.12.2 limitation)
  • Can teleport players safely out of vehicles and trains (IV, IR, etc.)
  • Correctly shows minute and minutes based on remaining time (impressive === 1 ternary if)
  • Teleports players back to where they were (be careful when jailing flying players or in otherwise dangerous situations)
  • Sets players back to survival mode on release

Adds an unjail command that:

/unjail <player>

  • Has permission group: commands.jail
  • Can release people from jail immediately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants