No idea if this works since I have no Java Edition server to test on.
- There are probably many errors and issues with this code (some dumb ones probably). As of right now it crashes the client.