mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 14:13:36 +00:00
40 lines
1.1 KiB
C++
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;
|
|
// }
|
|
}
|