feather-rs / feather

A Minecraft server implementation in Rust
Apache License 2.0
2.58k stars 142 forks source link

Support for custom tablist header and footer #513

Open Kecerim24 opened 2 years ago

Kecerim24 commented 2 years ago

Tablist header and footer

Status

Description

Created a new TablistHeaderFooter that is sent to newly connected players. Other code can update this by changing this structure in Game::Resources and causing a TablistExtrasUpdateEvent which resends the data to all clients.

Related issues

Checklist

Kecerim24 commented 2 years ago

(45d01df) quill/common/src/tablist.rs of course

Defman commented 2 years ago

I'm not sure if this should be store in the default config. It would be quite easy to write a plugin, which sets the header and footer based on a config file. Going down this rapid hole, would result in a masive config file.

Iaiao commented 2 years ago

It's currently impossible to write a plugin that interacts with resources, and we don't have a config API yet. Also, I think it would be a great first experience if we have static tablist header/footer built-in, the same way as we do with motd. Like I said in the previous conversation, everyone wants a pretty tablist in their [mini-game or lobby] server, and it's important to have very-commonly-used features built-in rather than to rely on third-party "must-have" plugins (which we don't even have yet). btw rust's stdlib sometimes gets replacements for very popular crates (plugins) like assert_matches (which is going to land soon) or lazy_static (which was superseded by once_cell and now we have #![feature(once_cell)] in std::lazy)