4jcraft/Minecraft.World/Commands/ExperienceCommand.cpp
2026-03-13 17:06:56 -05:00

40 lines
1.1 KiB
C++

#include "../Platform/stdafx.h"
#include "../Headers/net.minecraft.commands.h"
#include "../../Minecraft.Client/MinecraftServer.h"
#include "../../Minecraft.Client/Network/PlayerList.h"
#include "ExperienceCommand.h"
EGameCommand ExperienceCommand::getId() { return eGameCommand_Experience; }
void ExperienceCommand::execute(std::shared_ptr<CommandSender> source,
byteArray commandData) {
// if (args.length > 0)
//{
// Player player;
// int amount = convertArgToInt(source, args[0], 0, 5000);
// if (args.length > 1) {
// player = getPlayer(args[1]);
// } else {
// player = convertSourceToPlayer(source);
// }
// player.increaseXp(amount);
// logAdminAction(source, "commands.xp.success", amount,
//player.getAName());
//}
}
std::shared_ptr<Player> ExperienceCommand::getPlayer(PlayerUID playerId) {
return nullptr;
// std::shared_ptr<Player> player =
// MinecraftServer::getInstance()->getPlayers()->getPlayer(playerId);
// if (player == null)
//{
// throw new PlayerNotFoundException();
// } else {
// return player;
// }
}