From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.World/ExperienceCommand.cpp | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Minecraft.World/ExperienceCommand.cpp (limited to 'Minecraft.World/ExperienceCommand.cpp') diff --git a/Minecraft.World/ExperienceCommand.cpp b/Minecraft.World/ExperienceCommand.cpp new file mode 100644 index 00000000..b8ac2efc --- /dev/null +++ b/Minecraft.World/ExperienceCommand.cpp @@ -0,0 +1,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 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 ExperienceCommand::getPlayer(PlayerUID playerId) +{ + return nullptr; + //shared_ptr player = MinecraftServer::getInstance()->getPlayers()->getPlayer(playerId); + + //if (player == null) + //{ + // throw new PlayerNotFoundException(); + //} else { + // return player; + //} +} \ No newline at end of file -- cgit v1.2.3