Skip to content

Commit

Permalink
fix: 玩家加入时其伪装信息不会被同步给服务器其他玩家
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Nov 1, 2023
1 parent 2b42c57 commit 581f1ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/xiamomc/morph/events/CommonEventProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import xiamomc.morph.misc.NetworkingHelper;
import xiamomc.morph.misc.permissions.CommonPermissions;
import xiamomc.morph.network.commands.S2C.S2CSwapCommand;
import xiamomc.morph.network.commands.S2C.clientrender.S2CRenderMapMetaCommand;
import xiamomc.morph.network.commands.S2C.map.S2CMapRemoveCommand;
import xiamomc.morph.network.server.MorphClientHandler;
import xiamomc.morph.network.server.ServerSetEquipCommand;
Expand Down Expand Up @@ -444,6 +445,11 @@ public void onPlayerJoin(PlayerJoinEvent e)

networkingHelper.sendCommandToRevealablePlayers(morphs.genPartialMapCommand(state));

var metaCommand = networkingHelper.prepareMeta(player)
.forDisguiseState(state)
.build();
networkingHelper.sendCommandToAllPlayers(metaCommand);

if (morphs.isUsingClientRenderer())
networkingHelper.sendCommandToAllPlayers(morphs.genClientRenderAddCommand(state));

Expand Down

0 comments on commit 581f1ff

Please sign in to comment.