Updating commands and Packet API

- Added wrapper for PacketHandshakeInSetProtocol
- Took ProtocolAPI from Atlas to implement ViaVersion and ProtocolSupport version checking hooks.
- Added hook into "Login" style packets.
- Wth this new hook, we get player version numbers and store them by Channel now.
- Packets are now initialized in the same join listener as where APlayer is generated in JoinListener class.
- Removed Listener extension from HandlerAbstract, ModernHandler, LegacvHandler

NOTE: Protocol version grabbing needs implemented for LegacyHandler (1.7.10 version)
This commit is contained in:
Dawson
2022-08-11 12:27:16 -04:00
parent 0c3066103c
commit 234744e98d
17 changed files with 308 additions and 72 deletions
@@ -34,7 +34,7 @@ public class PlayerRegistry {
public void unregister(UUID uuid) {
synchronized (aplayerMap) {
Optional.of(aplayerMap.remove(uuid.hashCode())).ifPresent(APlayer::unload);
Optional.ofNullable(aplayerMap.remove(uuid.hashCode())).ifPresent(APlayer::unload);
}
}