Fix error when receiving capabilities for an invalid player

This commit is contained in:
Sollace 2021-03-05 20:08:20 +02:00
parent 1cb6c6ac00
commit fc8c68c100

View file

@ -55,6 +55,7 @@ public class MsgPlayerCapabilities implements Channel.Packet {
Pony player = getRecipient(sender); Pony player = getRecipient(sender);
if (player == null) { if (player == null) {
Unicopia.LOGGER.warn("Skipping capabilities for unknown player " + playerId.toString()); Unicopia.LOGGER.warn("Skipping capabilities for unknown player " + playerId.toString());
return;
} }
if (compoundTag.isEmpty()) { if (compoundTag.isEmpty()) {
player.setSpecies(newRace); player.setSpecies(newRace);