Skip to content

Feat/players command#3

Merged
asn44nb merged 3 commits into
mainfrom
feat/players-command
May 19, 2026
Merged

Feat/players command#3
asn44nb merged 3 commits into
mainfrom
feat/players-command

Conversation

@asn44nb
Copy link
Copy Markdown
Collaborator

@asn44nb asn44nb commented May 19, 2026

No description provided.

datalib-bot added 3 commits May 19, 2026 07:31
- /datalib players <name> [info] — clickable info menu (UUID, gamemode,
  OP status, health, ping, position, world)
- /datalib players <name> kick [reason] — disconnect with optional reason
- /datalib players <name> op / deop — grant or revoke operator
- /datalib players <name> gamemode <mode> — survival/creative/adventure/spectator
  (accepts full name, letter shorthand, or numeric id)
- /datalib players <name> tp — teleport executor to target player

All subcommands require permission level 2.
Tab-complete for online players and gamemodes.
- pingMilliseconds does not exist in Yarn 1.21.1+build.3
  The correct field name is ServerPlayerEntity#latency
- Replace getPlayerOrThrow() (checked exception) with getPlayer()
  null check — simpler and no import needed
- Remove ping display (field name unverifiable without Gradle env)
- Replace networkHandler.disconnect() with /kick via command dispatcher
- Replace ServerPlayerEntity.teleport() with /tp via command dispatcher
  (1.21.1 changed teleport() to take TeleportTarget, 6-arg overload removed)
- Replace changeGameMode() with /gamemode via command dispatcher
- All vanilla commands run under the operator's own source context
  so permission checks are already satisfied (requires level 2)
@asn44nb asn44nb merged commit 85bb9fd into main May 19, 2026
2 checks passed
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.

1 participant