Skip to content

Commit 112c91f

Browse files
committed
feat: improve overload handling for C++ api doc
1 parent aed63fb commit 112c91f

File tree

148 files changed

+1549
-1328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+1549
-1328
lines changed

content/reference/cpp/action_form.mdx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,16 @@ Bases: [`endstone::Form`](classendstone_1_1_form.md)
102102
```cpp
103103
using endstone::ActionForm::Control = std::variant<Button, Divider, Header, Label>;
104104
```
105-
106-
107105
### <code className="doc-symbol doc-symbol-typedef"/> OnSubmitCallback [#OnSubmitCallback]
108106

109107
```cpp
110108
using endstone::ActionForm::OnSubmitCallback = std::function<void(Player *, int)>;
111109
```
112-
113-
114110
### <code className="doc-symbol doc-symbol-function"/> ActionForm [#ActionForm]
115111

116112
```cpp
117113
explicit endstone::ActionForm::ActionForm () = default
118114
```
119-
120-
121115
### <code className="doc-symbol doc-symbol-function"/> addButton [#addButton]
122116

123117
```cpp
@@ -132,6 +126,8 @@ Adds a button to the form.
132126

133127

134128

129+
130+
135131
**Parameters:**
136132

137133

@@ -160,6 +156,8 @@ Adds a divider to the form.
160156

161157

162158

159+
160+
163161
**Returns:**
164162

165163
A reference to the current form.
@@ -181,6 +179,8 @@ Adds a header to the form.
181179

182180

183181

182+
183+
184184
**Parameters:**
185185

186186

@@ -209,6 +209,8 @@ Adds a label to the form.
209209

210210

211211

212+
213+
212214
**Parameters:**
213215

214216

@@ -235,6 +237,8 @@ Get the content of the form.
235237

236238

237239

240+
241+
238242
**Returns:**
239243

240244
The content of the form.
@@ -254,6 +258,8 @@ Get the controls of the action form.
254258

255259

256260

261+
262+
257263
**Returns:**
258264

259265
A list of controls in the action form.
@@ -273,6 +279,8 @@ Gets the on submit callback of the form.
273279

274280

275281

282+
283+
276284
**Returns:**
277285

278286
The on submit callback of the form.
@@ -294,6 +302,8 @@ Set the content of the form.
294302

295303

296304

305+
306+
297307
**Parameters:**
298308

299309

@@ -322,6 +332,8 @@ Set the controls of the action form.
322332

323333

324334

335+
336+
325337
**Parameters:**
326338

327339

@@ -350,6 +362,8 @@ Sets the on submit callback of the form.
350362

351363

352364

365+
366+
353367
**Parameters:**
354368

355369

content/reference/cpp/actor.mdx

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ Adds a tag to this actor.
174174

175175

176176

177+
178+
177179
**Parameters:**
178180

179181

@@ -200,6 +202,8 @@ Gets an Actor as Item .
200202

201203

202204

205+
206+
203207
**Returns:**
204208

205209
[**Item**](classendstone_1_1_item.md), nullptr if not an [**Item**](classendstone_1_1_item.md)
@@ -219,6 +223,8 @@ Gets an Actor as Mob .
219223

220224

221225

226+
227+
222228
**Returns:**
223229

224230
[**Mob**](classendstone_1_1_mob.md), nullptr if not an [**Mob**](classendstone_1_1_mob.md)
@@ -259,6 +265,8 @@ Gets the entity's health from 0 to its max possible value, where 0 is dead.
259265

260266

261267

268+
269+
262270
**Returns:**
263271

264272
Health represented from 0 to max
@@ -278,6 +286,8 @@ Returns a unique id for this actor.
278286

279287

280288

289+
290+
281291
**Returns:**
282292

283293
[**Actor**](classendstone_1_1_actor.md) id
@@ -339,6 +349,8 @@ Gets the maximum health this entity has.
339349

340350

341351

352+
353+
342354
**Returns:**
343355

344356
Maximum health
@@ -358,6 +370,8 @@ Gets the current name tag of the actor.
358370

359371

360372

373+
374+
361375
**Returns:**
362376

363377
The name tag.
@@ -398,6 +412,8 @@ Gets the current score tag of the actor.
398412

399413

400414

415+
416+
401417
**Returns:**
402418

403419
The score tag.
@@ -417,6 +433,8 @@ Returns a list of scoreboard tags for this actor.
417433

418434

419435

436+
437+
420438
**Returns:**
421439

422440
a list of scoreboard tags for this actor
@@ -434,6 +452,8 @@ virtual std::string endstone::Actor::getType () const = 0
434452

435453
Get the type of the actor.
436454

455+
456+
437457
This method returns the type of the actor as a string, for example, minecraft:pig.
438458

439459

@@ -479,6 +499,8 @@ Returns true if this actor has been marked for removal.
479499

480500

481501

502+
503+
482504
**Returns:**
483505

484506
True if it is dead.
@@ -540,6 +562,8 @@ Checks if the actor's name tag is always visible.
540562

541563

542564

565+
566+
543567
**Returns:**
544568

545569
True if the name tag is always visible, false otherwise.
@@ -559,6 +583,8 @@ Checks if the actor's name tag is currently visible.
559583

560584

561585

586+
587+
562588
**Returns:**
563589

564590
True if the name tag is visible, false otherwise.
@@ -636,6 +662,8 @@ Removes a given tag from this actor.
636662

637663

638664

665+
666+
639667
**Parameters:**
640668

641669

@@ -687,6 +715,8 @@ Sets the name tag for the actor.
687715

688716

689717

718+
719+
690720
**Parameters:**
691721

692722

@@ -708,6 +738,8 @@ Sets whether the actor's name tag should always be visible.
708738

709739

710740

741+
742+
711743
**Parameters:**
712744

713745

@@ -729,6 +761,8 @@ Sets if the actor's name tag is visible or not.
729761

730762

731763

764+
765+
732766
**Parameters:**
733767

734768

@@ -782,6 +816,8 @@ Sets the score tag for the actor.
782816

783817

784818

819+
820+
785821
**Parameters:**
786822

787823

@@ -793,6 +829,8 @@ Sets the score tag for the actor.
793829

794830
### <code className="doc-symbol doc-symbol-function"/> teleport [#teleport]
795831

832+
833+
796834
```cpp
797835
virtual void endstone::Actor::teleport (
798836
Location location
@@ -818,7 +856,6 @@ Teleports this actor to the given location.
818856

819857

820858

821-
### <code className="doc-symbol doc-symbol-function"/> teleport [#teleport]
822859

823860
```cpp
824861
virtual void endstone::Actor::teleport (

content/reference/cpp/actor_damage_event.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ Bases: [`endstone::Cancellable`](classendstone_1_1_cancellable.md)
7474
```cpp
7575
const std::string endstone::ActorDamageEvent::NAME;
7676
```
77-
78-
7977
### <code className="doc-symbol doc-symbol-function"/> ActorDamageEvent [#ActorDamageEvent]
8078

8179
```cpp
@@ -85,8 +83,6 @@ inline endstone::ActorDamageEvent::ActorDamageEvent (
8583
const float damage
8684
)
8785
```
88-
89-
9086
### <code className="doc-symbol doc-symbol-function"/> getDamage [#getDamage]
9187

9288
```cpp
@@ -97,6 +93,8 @@ Gets the raw amount of damage caused by the event.
9793

9894

9995

96+
97+
10098
**Returns:**
10199

102100
The raw amount of damage caused by the event
@@ -116,6 +114,8 @@ Get the source of damage.
116114

117115

118116

117+
118+
119119
**Returns:**
120120

121121
a [**DamageSource**](classendstone_1_1_damage_source.md) detailing the source of the damage.
@@ -146,8 +146,6 @@ name of this event
146146

147147

148148

149-
Implements [*endstone::Event::getEventName*](classendstone_1_1_event.md#function-geteventname)
150-
151149
### <code className="doc-symbol doc-symbol-function"/> setDamage [#setDamage]
152150

153151
```cpp
@@ -160,6 +158,8 @@ Sets the raw amount of damage caused by the event.
160158

161159

162160

161+
162+
163163
**Parameters:**
164164

165165

content/reference/cpp/actor_death_event.mdx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ Bases: [`endstone::ActorEvent`](classendstone_1_1_actor_event.md)
6666
```cpp
6767
const std::string endstone::ActorDeathEvent::NAME;
6868
```
69-
70-
7169
### <code className="doc-symbol doc-symbol-function"/> ActorDeathEvent [#ActorDeathEvent]
7270

7371
```cpp
@@ -76,8 +74,6 @@ inline endstone::ActorDeathEvent::ActorDeathEvent (
7674
std::unique_ptr< DamageSource > damage_source
7775
)
7876
```
79-
80-
8177
### <code className="doc-symbol doc-symbol-function"/> getDamageSource [#getDamageSource]
8278

8379
```cpp
@@ -88,6 +84,8 @@ Gets the source of damage which caused the death.
8884

8985

9086

87+
88+
9189
**Returns:**
9290

9391
a [**DamageSource**](classendstone_1_1_damage_source.md) detailing the source of the damage for the death.
@@ -117,5 +115,4 @@ name of this event
117115

118116

119117

120-
121-
Implements [*endstone::Event::getEventName*](classendstone_1_1_event.md#function-geteventname)
118+

0 commit comments

Comments
 (0)