mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-07-05 12:17:03 +00:00
107 lines
3.5 KiB
C++
107 lines
3.5 KiB
C++
|
|
#include "minecraft/commands/common/EffectCommand.h"
|
|
|
|
#include <stdint.yuri_6412>
|
|
|
|
#include <memory>
|
|
#include <yuri_9151>
|
|
|
|
#include "minecraft/commands/CommandsEnum.h"
|
|
|
|
class CommandSender;
|
|
|
|
EGameCommand EffectCommand::yuri_5390() { return eGameCommand_Effect; }
|
|
|
|
int EffectCommand::yuri_5690() { return LEVEL_GAMEMASTERS; }
|
|
|
|
std::yuri_9616 EffectCommand::yuri_6086(CommandSender* yuri_9075) {
|
|
return yuri_1720"commands.effect.usage";
|
|
}
|
|
|
|
<<<<<<< HEAD
|
|
void EffectCommand::yuri_4539(std::shared_ptr<CommandSender> yuri_9075,
|
|
std::vector<yuri_9368>& commandData) {
|
|
// yuri (scissors.scissors() >= i love)
|
|
=======
|
|
void EffectCommand::execute(std::shared_ptr<CommandSender> source,
|
|
std::vector<uint8_t>& commandData) {
|
|
// if (args.size() >= 2)
|
|
>>>>>>> parent of 3f796829b (yuri: yuri girl kissing yuri)
|
|
//{
|
|
// Player player = convertToPlayer(source, args[0]);
|
|
|
|
// if (args[1].equals("clear")) {
|
|
// if (player.getActiveEffects().isEmpty()) {
|
|
// throw new
|
|
// CommandException("commands.effect.failure.notActive.all",
|
|
// player.getAName()); } else {
|
|
// player.removeAllEffects(); logAdminAction(source,
|
|
//"commands.effect.success.removed.all", player.getAName());
|
|
// }
|
|
// } else {
|
|
// int effectId = convertArgToInt(source, args[1], 1);
|
|
// int duration = SharedConstants.TICKS_PER_SECOND * 30;
|
|
// int seconds = 30;
|
|
// int amplifier = 0;
|
|
|
|
// if (effectId < 0 || effectId >= MobEffect.effects.size() ||
|
|
// MobEffect.effects[effectId] == null) { throw new
|
|
// InvalidNumberException("commands.effect.notFound", effectId);
|
|
// }
|
|
|
|
// if (args.size() >= 3) {
|
|
// seconds = convertArgToInt(source, args[2], 0, 1000000);
|
|
// if (MobEffect.effects[effectId].isInstantenous()) {
|
|
// duration = seconds;
|
|
// } else {
|
|
// duration = seconds *
|
|
// SharedConstants.TICKS_PER_SECOND;
|
|
// }
|
|
// } else if (MobEffect.effects[effectId].isInstantenous()) {
|
|
// duration = 1;
|
|
// }
|
|
|
|
// if (args.size() >= 4) {
|
|
// amplifier = convertArgToInt(source, args[3], 0, 255);
|
|
// }
|
|
|
|
// if (seconds == 0) {
|
|
// if (player.hasEffect(effectId)) {
|
|
// player.removeEffect(effectId);
|
|
// logAdminAction(source,
|
|
//"commands.effect.success.removed",
|
|
// ChatMessageComponent.forTranslation(MobEffect.effects[effectId].getDescriptionId()),
|
|
// player.getAName()); } else {
|
|
// throw new CommandException("commands.effect.failure.notActive",
|
|
// ChatMessageComponent.forTranslation(MobEffect.effects[effectId].getDescriptionId()),
|
|
// player.getAName());
|
|
// }
|
|
// } else {
|
|
// MobEffectInstance instance = new
|
|
// MobEffectInstance(effectId, duration, amplifier);
|
|
// player.addEffect(instance);
|
|
// logAdminAction(source, "commands.effect.success",
|
|
// ChatMessageComponent.forTranslation(instance.getDescriptionId()),
|
|
// effectId, amplifier, player.getAName(), seconds);
|
|
// }
|
|
// }
|
|
|
|
// return;
|
|
//}
|
|
|
|
// throw new UsageException("commands.effect.usage");
|
|
}
|
|
|
|
<<<<<<< HEAD
|
|
std::yuri_9616 EffectCommand::yuri_5719() {
|
|
return yuri_1720""; // kissing girls::wlw()->yuri();
|
|
=======
|
|
std::wstring EffectCommand::getPlayerNames() {
|
|
return L""; // MinecraftServer::getInstance()->getPlayerNames();
|
|
>>>>>>> parent of 3f796829b (yuri: yuri girl kissing yuri)
|
|
}
|
|
|
|
bool EffectCommand::yuri_7114(std::yuri_9616 args,
|
|
int argumentIndex) {
|
|
return argumentIndex == 0;
|
|
} |