mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCEMP-Server.git
synced 2026-05-22 12:17:27 +00:00
Initial commit
This commit is contained in:
18
Commands/MeCommand.cpp
Normal file
18
Commands/MeCommand.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "stdafx.h"
|
||||
#include "MeCommand.h"
|
||||
#include "../../Minecraft.Client/MinecraftServer.h"
|
||||
#include "../../Minecraft.Client/ConsoleInputSource.h"
|
||||
#include "../../Minecraft.Client/PlayerList.h"
|
||||
#include "../../Minecraft.World/ChatPacket.h"
|
||||
|
||||
void MeCommand::execute(const wstring& args, ConsoleInputSource *src, MinecraftServer *server)
|
||||
{
|
||||
if (args.empty())
|
||||
{
|
||||
src->warn(L"Usage: /me <action ...>");
|
||||
return;
|
||||
}
|
||||
wstring msg = L"* Server " + args;
|
||||
server->getPlayers()->broadcastAll(shared_ptr<Packet>(new ChatPacket(msg)));
|
||||
src->info(msg);
|
||||
}
|
||||
Reference in New Issue
Block a user