Skip to content

Add admin command, /rtp cancel and /rtp <player> <world> - #14

Open
mozidevv wants to merge 3 commits into
toprakdevx:mainfrom
mozidevv:main
Open

Add admin command, /rtp cancel and /rtp <player> <world>#14
mozidevv wants to merge 3 commits into
toprakdevx:mainfrom
mozidevv:main

Conversation

@mozidevv

@mozidevv mozidevv commented Aug 1, 2026

Copy link
Copy Markdown

Summary

  • /lexonrtp reload - Reload config and message files without a server restart (lexonrtp.admin, default op).
  • /rtp cancel - Cancel an active solo teleport countdown via command.
  • /rtp - Admin: teleport another player to a world (lexonrtp.admin). Works from console too.
  • New messages (en + tr): rtp-cancelled, rtp-cancel-none, player-not-found, reloaded, lexonrtp-help.
  • README updated with the new commands and permissions.

Compatibility

  • Built against the same Paper 1.21.3 API, Folia-friendly (all scheduler calls go through Scheduler).
  • No breaking config changes; new keys are optional.

- /lexonrtp reload: reload config and messages without restart
- /rtp cancel: cancel active solo teleport countdown
- /rtp <player> <world>: admin teleport of other players (lexonrtp.admin)
- Console support for admin teleports
- New messages: rtp-cancelled, rtp-cancel-none, player-not-found,
  reloaded, lexonrtp-help (en + tr)
@Nrleryxx

Nrleryxx commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

/rtp cancel does not reset the title on screen
When the countdown is running the title stays frozen after using the cancel command
MenuListener onMove already calls resetTitle so the command path should do the same

@Nrleryxx

Nrleryxx commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

/rtp cancel does nothing during the searching phase
cancelSoloCountdown only checks the soloCountdowns set but that set is only filled when startCountdown runs
During the async location search the player is only in inQueue so cancel returns false and the teleport still happens afterwards
Call queue remove uuid in the cancel path so the startCountdown guard stops the chain

@Nrleryxx

Nrleryxx commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

toLowerCase without Locale ROOT breaks world keys on Turkish servers
ISLAND toLowerCase becomes islan with a dotless i so the keys do not match
Use toLowerCase Locale ROOT in RtpCommand and BaseRtpCommand

@Nrleryxx

Nrleryxx commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

admin gets no feedback for rtp player world
All result messages go to the target player only invalid world cooldown teleport success and failure
The admin or console sender sees nothing except player not found
Send a confirmation to the sender as well

@Nrleryxx

Nrleryxx commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

getPlayer does prefix matching consider getPlayerExact
Tab complete can suggest cancel twice when a world key also starts with cancel
Extra args beyond length 2 are silently ignored
Console rtp cancel shows players only which is a bit confusing

- /rtp cancel now resets the on-screen title and works during the
  async location search phase (queue.remove stops the countdown chain)
- All world key toLowerCase calls use Locale.ROOT (Turkish locale no
  longer breaks keys like ISLAND)
- Admin/console sender now receives feedback: mirrored request
  outcomes plus admin-rtp-success/admin-rtp-fail on teleport result
- Use getPlayerExact for admin targets, avoid duplicate 'cancel' tab
  suggestion, reject >2 args with usage, clearer console messages
@toprakdevx

Copy link
Copy Markdown
Owner

rtp cancel doesnt work during searching phase teleport still happens after remove player from soloQueue too

@toprakdevx

Copy link
Copy Markdown
Owner

rtp cancel leaves title frozen on screen call resetTitle

@toprakdevx

Copy link
Copy Markdown
Owner

reload doesnt reload redis call close connect startReconnect

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.

3 participants