* Add secure chat configuration option
* Add secure chat bool to login packet
* change name of config flag
* add packet deserializer for player session packet
* make session update async
* Change config option
* Formatting
* Add chat configuration option
* Basic custom chat formatting
* formatting
* Add chat session to Player
* fix duplicate imports
* Formatting
* chat validation mostly working
* add registry for custom raw message
* chat formatting working with secure chat
* don't share session tokens if reporting blocked
* add received message index
* add custom registry without modifying asset files
* resolve color decorator before MESSAGE so player can't inject color codes by default
* move comment
* update all player sessions on join
* better previous message handling
* fix multiplayer bugs
* send new players existing signatures
* clean stuff up
* only send ChatSession if reports are enabled
* make clippy happy
* feat(player-data): Support saving and loading player NBT Data
* fix(player_data): ensure player data is save before continuing
* fix(player_data): implement NBTStorage for hunger data
* feat(player-data): allow setting world name in config
* fix(player-data): use correct method to retrieve world_name
* feat(player-data): move PlayerDataStorage to pumpkin-world
* fix(player-data): ci not building
* fix(player-data): ci not building
* feat(player-data): support inventory saving + review fix
* fix(player-data): forgot the format
* some fixes
* fix clippy
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* Major grammar sweep
* Remove extra backtick
* Use more specific terminology for chunk data storage
* Forgor to cargofmt
* Fix typo "thier"
* Fix typo "clousures"
* Try new terminology
* Forgor to cargofmt
* Use "Subchunks" instead of "Heterogeneous" for ChunkBlocks variant
* Fix variable name
* Forgor to change comment
* Add Defaultgamemode command
* add force_gamemode in configuration.toml
Check if the force_gamemode is enabled while doing the command
* Delete useless import + adapt to the new TextComponent::translate.
* add a space...
* Save the default gamemode in the server
* refactor + delete a .clone
* Add #[must_use]
* feat: add linear chunk format with zstd lib dependency
* fixing a typo
* refactor: rename file handling methods for clarity and more lint fixes
* refactor: improve clarity on validation methods
* fix: invert version check in LinearFile header validation
* fix: remove leading dot from file path formatting in LinearChunkFormat
* refactor: improve error handling and method naming in LinearFile operations
* fix: ensure file is flushed after writing in LinearFile operations
* fix: lints and warnings
* fix: more lints
* refactor: streamline LinearFile structure and improve header management
* refactor: change chunks_headers to use Box for improved memory management and use exception to know if file exist
* refactor: update path parameter types to PathBuf for consistency and improved usability
* refactor: update path parameter types to Path avoiding uknown changes and adjust file truncation logic
* fix: avoid using the same path for different tests
* fix: fix some bytes sizes for the header based on the spec
* refactor: enable file truncation when opening for writing and simplify save method
* fix: removing IoSlices for windows issues.
* fix: clippy lints
* refactor: improve incompatible files cheking, some documentation and variable nameing
* feat: add file_format to ChunkConfig and implement format handling in Level
* feat: add error logging for invalid file headers and data size checks in LinearFile and tmp filenames on write
* feat: implement file locking mechanism for concurrent chunk read/write operations
* fix: bug at desserializing the chunks headers.
* Refactor chunk file locking mechanism to use DashMap for improved concurrency and simplify read/write guard management
* docs: Update documentation for LinearVersion enum with format references
* re-check workflows
* re-check lints 2
* rename config values
* Some doc improvements
---------
Co-authored-by: Mili <santiagoogle@hotmail.com>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* simplify all
* fmt
* Consider using derive macro
* Add new events
* Add events call
* minor fixes
* minor fixes
* fix
* optimize code
* big changes
* fix skill issue
* fix
* Consider not specify patch version
* make logger shared
* i want test one thing
* Add one useful function
* add little amouth of docs
* use config instead
* revert changes
* fmt
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* Starting work on Operator permission system
This commit adds the ops.json configuration found in vanilla
servers, and updates the basic configuration to handle the default
permission level.
Server now uses ops file and defaults players to op level 0
The /op command has been added but needs players to rejoin for now.
* Clippy Fix + need to Rejoin after /op removed
I found the source of the DeadLock. Updated set permission function.
Fix cargo formatting issues and clippy issues.
* Remove temp warn message
* Move OperatorConfig to server
As Snowiii pointed out, OperatorConfig is runtime data.
Revert most changes in pumpkin-config.
op_permission_level must say in the basic configuration for
parity with Minecraft.
* cargo fmt + cargo clippy
* Sync permission change with client
* Fixs issues @Commandcracker found in review
- Move PermissionLvl to core and removed OpLevel
- Move ops.json to /data/ops.json
- Fix permissions issue with /op command
- Shorten /op command description
* refactor into `data` folder
* create data dir when needed
* add to readme
* fix: conflicts
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* Add query options to config
Added packet data types
Correctly parse a handshake packet
Add tokio to pumpkin protocol for `AsyncReadExt` convenience functions
* Add repr(u8) so that PacketType is a byte
* Respond to handshake correctly
* Allow for proper decoding of status packets and properly handle errors in decoding
* Implement challange tokens and verify with token and address
* Encode Basic status packet
Switch to CString since its better to and null errors higher up the code
* Encode Full status packet
* Add forgotten fields to full status packet
* Correctly respond to query clients when requesting full status
* Return actual address and port of server
Respect config options
Remove uncessary debug derives
* Remove packet type as it is redundant/unnecssary
* Implement basic status request
Refactor code for better error handling
* Update README
* Show players correctly in full status packet
* Store all packets in structs instead of enums
Break up en/decoding for each packet
Reduce client tracking
Get rid of QueryClients struct
Stop storing of magic value and check during decoding
Added tests for all decoding and encoding
Fix all sugestions from @StripedMonkey
* Implement max player limit
* Removed unnecessary `return`.
* Moved server full check to start of `handle_login_start`
Also removed unnecessary debug log.
* Use instead of for max players; add disable logic
* Fix semicolon missing
Remove all unwraps when handling packets. Also improve split Packets into Client & Server bound removing ugly match statement where we are reading Clientboud Packets (which is impossible).