aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ExperienceCommand.cpp
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/ExperienceCommand.cpp
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.World/ExperienceCommand.cpp')
-rw-r--r--Minecraft.World/ExperienceCommand.cpp41
1 files changed, 41 insertions, 0 deletions
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<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;
+ //}
+} \ No newline at end of file