Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit 361561e

Browse files
committed
Add configuration.
1 parent 636bed6 commit 361561e

File tree

10 files changed

+122
-48
lines changed

10 files changed

+122
-48
lines changed

Writerside/cfg/buildprofiles.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44

5-
<variables></variables>
65
<build-profile instance="hi">
76
<variables>
87
<noindex-content>true</noindex-content>
8+
<primary-color>purple</primary-color>
9+
<color-preset>purple</color-preset>
910
</variables>
1011
</build-profile>
1112

Writerside/litecommands.tree

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
start-page="Introdution.md">
88

99
<toc-element topic="Introdution.md">
10-
<toc-element topic="Getting-started.md"/>
10+
<toc-element topic="Dependency.md"/>
11+
<toc-element topic="Configuration.md"/>
1112
</toc-element>
1213
<toc-element topic="Platforms.md">
1314
<toc-element topic="SENDER.md"/>
1415
</toc-element>
15-
<toc-element topic="Command-Structure.md"/>
16+
<toc-element topic="Command.md"/>
1617
<toc-element topic="Arguments.md">
1718
<toc-element topic="Supported-Types.md"/>
1819
<toc-element topic="Unsupported-Types-TODO.md"/>

Writerside/redirection-rules.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@
3434
<description>Created after removal of "| III | Command Str" from LiteCommands</description>
3535
<accepts>Features.html</accepts>
3636
</rule>
37+
<rule id="dbb0302">
38+
<description>Created after removal of "Configuration - Bukkit" from LiteCommands</description>
39+
<accepts>Configuration-Bukkit.html</accepts>
40+
</rule>
3741
</rules>

Writerside/topics/Command-Structure.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

Writerside/topics/Command.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Command
2+
3+
<tldr>
4+
<p>
5+
Annotations <shortcut>@Command</shortcut> <shortcut>@Execute</shortcut>
6+
</p>
7+
</tldr>
8+
9+
The command structure is the most important part of the command. It is the structure that determines how the command will be executed.
10+
11+
For example, the command `/time day`
12+
13+
```java
14+
@Command(name = "time")
15+
public class TimeCommand {
16+
17+
@Execute(name = "day")
18+
public void day() {
19+
// ... set time to day
20+
}
21+
22+
}
23+
```

Writerside/topics/Configuration.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Configuration
2+
3+
Create a new instance of `LiteCommands` using specific factory for your platform.
4+
5+
<tabs>
6+
7+
<!-- Bukkit -->
8+
<tab title="Bukkit">
9+
10+
```Java
11+
this.liteCommands = LiteCommandsBukkit.builder("my-plugin", this)
12+
.commands(
13+
new FlyCommand(),
14+
new GameModeCommand()
15+
)
16+
.build();
17+
```
18+
</tab>
19+
20+
<!-- Velocity -->
21+
<tab title="Velocity">
22+
23+
```Java
24+
this.liteCommands = LiteVelocityFactory.builder(this.proxyServer)
25+
.commands(
26+
new SendCommand(),
27+
new MoveCommand()
28+
)
29+
.build();
30+
```
31+
</tab>
32+
33+
<!-- BungeeCord -->
34+
<tab title="BungeeCord">
35+
36+
```Java
37+
this.liteCommands = LiteBungeeFactory.builder(this)
38+
.commands(
39+
new SendCommand(),
40+
new MoveCommand()
41+
)
42+
.build();
43+
```
44+
</tab>
45+
46+
<!-- Minestom -->
47+
<tab title="Minestom">
48+
49+
```Java
50+
Server server = MinecraftServer.getServer();
51+
CommandManager commandManager = MinecraftServer.getCommandManager();
52+
53+
this.liteCommands = LiteMinestomFactory.builder(server, commandManager)
54+
.commands(
55+
new FlyCommand(),
56+
new GameModeCommand()
57+
)
58+
.build();
59+
```
60+
</tab>
61+
62+
<!-- JDA -->
63+
<tab title="JDA">
64+
65+
```Java
66+
JDA jda = JDABuilder.createDefault("token")
67+
.build();
68+
69+
this.liteCommands = LiteJDAFactory.builder(jda)
70+
.commands(
71+
new EmbedCommand(),
72+
new MessageCommand()
73+
)
74+
.build();
75+
```
76+
</tab>
77+
78+
79+
</tabs>

Writerside/topics/Getting-started.md renamed to Writerside/topics/Dependency.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Getting started
1+
# Dependency
22

33
This page will guide you through the process of adding LiteCommands to your project.
44
<tip>
@@ -43,7 +43,7 @@ Add the following line to your `build.gradle.kts` file in the `dependencies` sec
4343
<br/><br/>
4444

4545
```kotlin
46-
implementation("dev.rollczi:[[[ARTIFACT_ID|Platforms.md]]]:3.0.1")
46+
implementation("dev.rollczi:[[[ARTIFACT_ID|Platforms.md]]]:%latest_version%")
4747
```
4848
</tab>
4949

@@ -56,7 +56,7 @@ Add the following lines to your `pom.xml` file in the `dependencies` section:
5656
<dependency>
5757
<groupId>dev.rollczi</groupId>
5858
<artifactId>[[[ARTIFACT_ID|Platforms.md]]]</artifactId>
59-
<version>3.0.1</version>
59+
<version>%latest_version%</version>
6060
</dependency>
6161
```
6262
</tab>

Writerside/topics/adventure-platform.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Add the following dependency to your project:
1515
<tab title="Gradle KTS">
1616

1717
```kotlin
18-
implementation("dev.rollczi:litecommands-adventure-platform:3.0.1")
18+
implementation("dev.rollczi:litecommands-adventure-platform:%latest_version%")
1919
```
2020
</tab>
2121
<tab title="Maven">
@@ -24,7 +24,7 @@ implementation("dev.rollczi:litecommands-adventure-platform:3.0.1")
2424
<dependency>
2525
<groupId>dev.rollczi</groupId>
2626
<artifactId>litecommands-adventure-platform</artifactId>
27-
<version>3.0.1</version>
27+
<version>%latest_version%</version>
2828
</dependency>
2929
```
3030
</tab>

Writerside/topics/adventure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Add the following dependency to your project:
1616
<tab title="Gradle KTS">
1717

1818
```kotlin
19-
implementation("dev.rollczi:litecommands-adventure:3.0.1")
19+
implementation("dev.rollczi:litecommands-adventure:%latest_version%")
2020
```
2121
</tab>
2222
<tab title="Maven">
@@ -25,7 +25,7 @@ implementation("dev.rollczi:litecommands-adventure:3.0.1")
2525
<dependency>
2626
<groupId>dev.rollczi</groupId>
2727
<artifactId>litecommands-adventure</artifactId>
28-
<version>3.0.1</version>
28+
<version>%latest_version%</version>
2929
</dependency>
3030
```
3131
</tab>

Writerside/v.list

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE vars SYSTEM "https://resources.jetbrains.com/writerside/1.0/vars.dtd">
33
<vars>
4-
<var name="product" value="Writerside"/>
4+
<var name="product" value="LiteCommands"/>
5+
<var name="latest_version"
6+
value="3.1.2"
7+
/>
58
</vars>

0 commit comments

Comments
 (0)