Skip to content

Add support for transfer packets#52

Merged
Quozul merged 13 commits intoQuozul:masterfrom
cadenkriese:transfer-packets
Jan 28, 2026
Merged

Add support for transfer packets#52
Quozul merged 13 commits intoQuozul:masterfrom
cadenkriese:transfer-packets

Conversation

@cadenkriese
Copy link
Contributor

@cadenkriese cadenkriese commented Jan 26, 2026

I added a accept_transfers config boolean, which is false by default. When accept_transfers is set to true, PicoLimbo will accept incoming connections with the transfer intention.

I also added a /transfer <hostname> [<port>] command that transfers the player who executes it to the specified hostname and port.

Demo

PicoLimbo_Transfer_Demo.mp4

AI Usage Disclosure

All code was written by me. I used ChatGPT 5.2 and Google Gemini 2.5 for help with Rust syntax as I've never used the language before and for some help explaining the codebase.

@Quozul
Copy link
Owner

Quozul commented Jan 26, 2026

This looks good to me. While testing it, I noticed two improvements:

  • Update the documentation in the docs directory to mention the new accept_transfers setting
  • Packet IDs are missing for the transfer packet for versions prior to 1.21, this has to be manually added to each packets.json files for the concerned versions (1.20.5 or greater)

@cadenkriese
Copy link
Contributor Author

Thanks for those pointers. Two questions I have:

Should the transfer command be disabled by default since it is usually a command reserved for operators?

Also, I noticed the /transfer (without any arguments) brigadier node is marked as executable, which causes the client to render the hostname as an optional paramater instead of required, as denoted by the brackets []:
brigadier-node-issue

I was thinking I could add a requiredArgumentCount int to the Command struct in commands_packet.rs and then only mark nodes after that count as executable. Would that work or would you prefer something else?

@Quozul
Copy link
Owner

Quozul commented Jan 26, 2026

Should the transfer command be disabled by default since it is usually a command reserved for operators?

That's a good question; I don't know 😅
The thing is, to disable a command, you have to set an empty string in the config file, which looks weird to me in a default config file. The best would be to update the commands config to something like this 🤔

[commands.transfer]
enabled = false
alias = "transfer"

This can be done in another pull request and leave the command available to everyone for now. It could also allow to whitelist some players in the future, for example, to run a reload or stop command.

Also, I noticed the /transfer (without any arguments) brigadier node is marked as executable, which causes the client to render the hostname as an optional paramater instead of required, as denoted by the brackets
I was thinking I could add a requiredArgumentCount int to the Command struct in commands_packet.rs and then only mark nodes after that count as executable. Would that work or would you prefer something else?

A required argument count int could work. I probably would've added a is executable bool to the arguments. Whichever you prefer!

@cadenkriese
Copy link
Contributor Author

Thanks again for your help. I'm happy with this now as long as you are.

@Quozul Quozul merged commit a991a83 into Quozul:master Jan 28, 2026
4 checks passed
@cadenkriese cadenkriese deleted the transfer-packets branch February 1, 2026 13:23
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