9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-31 04:46:37 +00:00
This commit is contained in:
jhqwqmc
2025-05-30 06:53:54 +08:00
parent 986c40d826
commit 4bcdfa2968
2 changed files with 2 additions and 3 deletions

View File

@@ -2290,7 +2290,7 @@ public class PacketConsumers {
private static BukkitNetworkManager.Handlers simpleAddEntityHandler(EntityPacketHandler handler) {
return (user, event) -> {
FriendlyByteBuf buf = event.getBuffer();
user.entityPacketHandlers().put(buf.readVarInt(), handler);
user.entityPacketHandlers().putIfAbsent(buf.readVarInt(), handler);
};
}
}