mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-08 14:59:21 +00:00
fix a bug with playerjoinevent (temporary fix)
This commit is contained in:
parent
9cbc9aca28
commit
aca05bad7b
|
|
@ -86,6 +86,7 @@ PlayerList::~PlayerList()
|
|||
|
||||
bool PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> player, shared_ptr<LoginPacket> packet)
|
||||
{
|
||||
// todo: we should move emit player join event here
|
||||
CompoundTag *playerTag = load(player);
|
||||
|
||||
bool newPlayer = playerTag == nullptr;
|
||||
|
|
@ -283,7 +284,9 @@ bool PlayerList::placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer>
|
|||
|
||||
// 4J-PB - removed, since it needs to be localised in the language the client is in
|
||||
//server->players->broadcastAll( shared_ptr<ChatPacket>( new ChatPacket(L"<22>e" + playerEntity->name + L" joined the game.") ) );
|
||||
#if !(defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD))
|
||||
broadcastAll(std::make_shared<ChatPacket>(player->name, ChatPacket::e_ChatPlayerJoinedGame));
|
||||
#endif
|
||||
|
||||
MemSect(14);
|
||||
add(player);
|
||||
|
|
|
|||
Loading…
Reference in a new issue