Initial commit

This commit is contained in:
NOTPIES
2026-03-15 22:25:51 -03:00
commit c356c7b911
100 changed files with 8788 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#include "stdafx.h"
#include "ListServerCommand.h"
#include "../../Minecraft.Client/MinecraftServer.h"
#include "../../Minecraft.Client/ConsoleInputSource.h"
#include "../../Minecraft.Client/PlayerList.h"
#include "../../Minecraft.Client/ServerPlayer.h"
void ListServerCommand::execute(const wstring& args, ConsoleInputSource *src, MinecraftServer *server)
{
PlayerList *playerList = server->getPlayers();
int count = playerList->getPlayerCount();
int max = playerList->getMaxPlayers();
wchar_t buf[128];
swprintf_s(buf, 128, L"There are %d/%d players online:", count, max);
src->info(wstring(buf));
src->info(playerList->getPlayerNames());
}