mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 16:24:11 +00:00
DWORD→uint32_t, BYTE→uint8_t, HRESULT→int32_t, HANDLE→void*, UINT→uint32_t, INT→int32_t, WORD→uint16_t, LONG→int32_t, SHORT→int16_t, LONGLONG→int64_t, ULONG_PTR→uintptr_t, PBYTE→uint8_t*, LPWSTR/PWSTR→wchar_t*, FLOAT→float, CHAR→char, boolean→bool, CONST→const, TRUE→true, FALSE→false across 176 files (excluding vendor libs and Linux stubs).
57 lines
1.8 KiB
C++
57 lines
1.8 KiB
C++
#include "../Platform/stdafx.h"
|
|
#include "../Headers/net.minecraft.commands.h"
|
|
#include "../../Minecraft.Client/MinecraftServer.h"
|
|
#include "../../Minecraft.Client/Network/PlayerList.h"
|
|
#include "../Headers/net.minecraft.world.level.h"
|
|
#include "ExperienceCommand.h"
|
|
|
|
EGameCommand ExperienceCommand::getId() { return eGameCommand_Experience; }
|
|
|
|
int ExperienceCommand::getPermissionLevel() { return LEVEL_GAMEMASTERS; }
|
|
|
|
void ExperienceCommand::execute(std::shared_ptr<CommandSender> source,
|
|
byteArray commandData) {
|
|
// if (args.length > 0) {
|
|
// Player player;
|
|
// String inputAmount = args[0];
|
|
//
|
|
// bool levels = inputAmount.endsWith("l") ||
|
|
// inputAmount.endsWith("L"); if (levels &&
|
|
// inputAmount.length() > 1) inputAmount = inputAmount.substring(0,
|
|
// inputAmount.length() - 1);
|
|
//
|
|
// int amount = convertArgToInt(source, inputAmount);
|
|
// bool take = amount < 0;
|
|
//
|
|
// if (take) amount *= -1;
|
|
//
|
|
// if (args.length > 1) {
|
|
// player = convertToPlayer(source, args[1]);
|
|
// } else {
|
|
// player = convertSourceToPlayer(source);
|
|
// }
|
|
//
|
|
// if (levels) {
|
|
// if (take) {
|
|
// player.giveExperienceLevels(-amount);
|
|
// logAdminAction(source,
|
|
//"commands.xp.success.negative.levels", amount, player.getAName());
|
|
//} else { player.giveExperienceLevels(amount);
|
|
// logAdminAction(source, "commands.xp.success.levels", amount,
|
|
// player.getAName());
|
|
// }
|
|
// } else {
|
|
// if (take) {
|
|
// throw new
|
|
// UsageException("commands.xp.failure.widthdrawXp");
|
|
// } else { player.increaseXp(amount);
|
|
// logAdminAction(source,
|
|
//"commands.xp.success", amount, player.getAName());
|
|
// }
|
|
// }
|
|
//
|
|
// return;
|
|
// }
|
|
//
|
|
// throw new UsageException("commands.xp.usage");
|
|
} |