LeviLamina
Loading...
Searching...
No Matches
KickCommand.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/server/commands/ServerCommand.h"
7
8// auto generated forward declare list
9// clang-format off
10class CommandOrigin;
11class CommandOutput;
12class CommandRegistry;
13class Level;
14class Minecraft;
15class Player;
16// clang-format on
17
18class KickCommand : public ::ServerCommand {
19public:
20 // member variables
21 // NOLINTBEGIN
24 // NOLINTEND
25
26public:
27 // prevent constructor by default
28 KickCommand& operator=(KickCommand const&);
29 KickCommand(KickCommand const&);
30 KickCommand();
31
32public:
33 // virtual functions
34 // NOLINTBEGIN
35 virtual void execute(::CommandOrigin const& origin, ::CommandOutput& output) const /*override*/;
36
37 virtual ~KickCommand() /*override*/ = default;
38 // NOLINTEND
39
40public:
41 // member functions
42 // NOLINTBEGIN
43 MCAPI bool
44 _canKickPlayerOrGenerateFailureOutput(::Player const& player, ::CommandOutput& output, ::Level* level) const;
45
46 MCAPI ::Player const* _findTarget(
47 ::CommandOrigin const& origin,
48 ::CommandOutput& output,
49 ::Level& level,
50 ::std::string const& message,
51 ::std::string const& reason,
52 ::std::string const& idOrName
53 ) const;
54
55 MCAPI void _generateSuccessOutput(
56 ::CommandOutput& output,
57 ::std::string const& playerNameTag,
58 ::std::string const& reason
59 ) const;
60
61 MCAPI ::Player const* _loopPlayers(
62 ::CommandOrigin const&,
64 ::Level& level,
65 ::std::string const&,
66 ::std::string const&,
67 ::std::function<bool(::Player const*)> condition
68 ) const;
69
70 MCAPI void _refreshJoinCode(::Level& level) const;
71 // NOLINTEND
72
73public:
74 // static functions
75 // NOLINTBEGIN
76 MCAPI static void _kickPlayer(
77 ::Minecraft* game,
78 ::Player const& matchingPlayer,
79 ::std::string const& message,
80 ::std::optional<::std::string> filteredMessage
81 );
82
83 MCAPI static void setup(::CommandRegistry& registry);
84 // NOLINTEND
85
86public:
87 // virtual function thunks
88 // NOLINTBEGIN
89 MCAPI void $execute(::CommandOrigin const& origin, ::CommandOutput& output) const;
90
91
92 // NOLINTEND
93
94public:
95 // vftables
96 // NOLINTBEGIN
97 MCNAPI static void** $vftable();
98 // NOLINTEND
99};
Definition CommandOrigin.h:32
Definition CommandOutput.h:19
Definition CommandRegistry.h:47
static MCAPI void ** $vftable()
Definition Level.h:249
Definition Minecraft.h:60
Definition Player.h:125
Definition ServerCommand.h:22
Definition Alias.h:14