Skip to content

Commit 76d6c03

Browse files
committed
Fix a NPE when playerPosSync is disabled
1 parent c108894 commit 76d6c03

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/net/evmodder/evmod/mixin/MixinClientPlayNetworkHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ abstract class MixinClientPlayNetworkHandler{
3535
@Inject(method="onEntitySpawn", at=@At("HEAD"))
3636
private final void onSpawn(final EntitySpawnS2CPacket packet, final CallbackInfo _ci){
3737
// If the incoming entity is a player and matches your target's UUID
38-
if(packet.getEntityType() == EntityType.PLAYER && AccessorMain.getInstance().syncPlayerPos.removeFakePlayer(packet.getUuid())){
38+
if(packet.getEntityType() == EntityType.PLAYER && AccessorMain.getInstance().syncPlayerPos != null &&
39+
AccessorMain.getInstance().syncPlayerPos.removeFakePlayer(packet.getUuid())){
3940
Main.LOGGER.info("[EvMod] Removed dummy player (real player spawned): "+packet.getUuid());
4041
}
4142
}

0 commit comments

Comments
 (0)