aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ExperienceCommand.cpp
blob: b8ac2efcb4f7c92c348df26e6cbcc068afe0e129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "stdafx.h"
#include "net.minecraft.commands.h"
#include "..\Minecraft.Client\MinecraftServer.h"
#include "..\Minecraft.Client\PlayerList.h"
#include "ExperienceCommand.h"

EGameCommand ExperienceCommand::getId()
{
	return eGameCommand_Experience;
}

void ExperienceCommand::execute(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());
	//}
}

shared_ptr<Player> ExperienceCommand::getPlayer(PlayerUID playerId)
{
	return nullptr;
	//shared_ptr<Player> player = MinecraftServer::getInstance()->getPlayers()->getPlayer(playerId);

	//if (player == null)
	//{
	//	throw new PlayerNotFoundException();
	//} else {
	//	return player;
	//}
}