Skip to content

Commit

Permalink
fix: fix Player::sendMessage broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Jan 5, 2025
1 parent 7039f75 commit ac1b00e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/mc/network/packet/Packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#include "mc/network/NetworkIdentifierWithSubId.h"
#include "mc/network/packet/Packet.h"
#include "mc/server/ServerLevel.h"
#include "mc/server/ServerPlayer.h"
#include "mc/world/Minecraft.h"
#include "mc/world/actor/player/Player.h"
#include "mc/world/level/dimension/Dimension.h"

void Packet::sendTo(ServerPlayer const& player) const {
void Packet::sendTo(Player const& player) const {
sendToClient(player.getNetworkIdentifier(), player.getClientSubId());
}

Expand Down
3 changes: 1 addition & 2 deletions src/mc/network/packet/Packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class ReadOnlyBinaryStream;
// clang-format on

class Player;
class ServerPlayer;
class Actor;
class BlockPos;
struct NetworkIdentifierWithSubId;
Expand All @@ -43,7 +42,7 @@ class Packet {
*
* @param player The server player to send the packet to.
*/
LLAPI void sendTo(ServerPlayer const& player) const;
LLAPI void sendTo(Player const& player) const;

/**
* Send the packet to all relevant players in a 2D plane at a position in a given dimension.
Expand Down

0 comments on commit ac1b00e

Please sign in to comment.