* 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
* Update JSON Files to 1.21.2
* Update constants to 1.21.2
* Port c_login_success to 1.21.2
* Fix: damage type
* Overhaul Packet ID system
We now use Packet IDS from enums.
1. This is very very nice for seeing which Packets are already implemented and which not.
2. This lets us easly port to newer Minecraft version, In vanilla there are no Packet ids hardcoded, Packet IDs will be parsed from a enum like this
* Port all Packets to 1.20.2
* Update README badge to 1.20.2
* Change doc for the new packet id system
I see people thinking Pumpkin does not have Chunk generation when they see that. What i actually meant was that there is no world folder structure saved. Pumpkin has Chunk generation
I still like to use target-cpu=native. The problem is that there is no cross platform way to the the env var RUSTFLAGS. I also don't want to have a script for that