#include "KillCommand.h" #include #include #include #include "minecraft/commands/CommandSender.h" #include "minecraft/commands/CommandsEnum.h" #include "minecraft/world/damageSource/DamageSource.h" #include "minecraft/world/entity/player/Player.h" EGameCommand KillCommand::getId() { return eGameCommand_Kill; } int KillCommand::getPermissionLevel() { return LEVEL_ALL; } void KillCommand::execute(std::shared_ptr source, std::vector& commandData) { std::shared_ptr player = std::dynamic_pointer_cast(source); player->hurt(DamageSource::outOfWorld, std::numeric_limits::max()); source->sendMessage("Ouch. That look like it hurt."); // source.sendMessage(ChatMessageComponent.forTranslation("commands.kill.success")); }