Carpet

Carpet

2M Downloads

Fake player’s first login causes a lot of lag.

yikerman opened this issue · 6 comments

commented

When using /player someone spawn, if 'someone' has never logged in, in some circumstances it can freeze a tick.

My guess is the player’s GameProfile is not in the cache so the game will fetch the information. If the connection to Mojang’s server is lagging it can get stuck.

commented

I suppose so, in which case I don't see how it can be fixed, because getting the GameProfile is obligatory for servers which aren't on offline mode... unless im mistaken?

commented

in which case I don't see how it can be fixed

@Ghoulboy78 Maybe we can move the networking stuff into a separate thread. (It shouldn’t block the ticking thread from the very beginning.)

commented

Does a regular player logging in cause the same? (for the first time at least if you believe it's related to caching)

commented

@altrisi The server is in offline mod so I have no idea whether this is the case.

commented
commented

@xiaoyu2006 直接修改GameProfile profile = new GameProfile(UUIDUtil.createOfflinePlayerUUID(playerName), playerName);就行了,正版验证部分注释掉就行