|
5 | 5 | // The ENDSTONE_PLUGIN macro defines the metadata for the plugin.
|
6 | 6 | ENDSTONE_PLUGIN(/*name=*/"CppExamplePlugin", /*version=*/"0.4.0", /*main_class=*/ExamplePlugin)
|
7 | 7 | {
|
8 |
| - plugin.description = "C++ example plugin for Endstone servers"; |
9 |
| - plugin.website = "https://github.com/EndstoneMC/cpp-example-plugin"; |
10 |
| - plugin.authors = {"Endstone Developers <hello@endstone.dev>"}; |
| 8 | + description = "C++ example plugin for Endstone servers"; |
| 9 | + website = "https://github.com/EndstoneMC/cpp-example-plugin"; |
| 10 | + authors = {"Endstone Developers <hello@endstone.dev>"}; |
11 | 11 |
|
12 |
| - plugin.command("debug") |
| 12 | + command("debug") // |
13 | 13 | .description("Print debug information.")
|
14 | 14 | .usages("/debug")
|
15 | 15 | .permissions("cpp_example.command.debug");
|
16 | 16 |
|
17 |
| - plugin.command("fibonacci") |
| 17 | + command("fibonacci") |
18 | 18 | .description("A simple command that writes the Fibonacci series up to n.")
|
19 | 19 | .usages("/fibonacci <n: int>")
|
20 | 20 | .aliases("fib")
|
21 | 21 | .permissions("cpp_example.command.fibonacci", "cpp_example.command.fibonacci.large_n");
|
22 | 22 |
|
23 |
| - plugin.permission("cpp_example.command") |
| 23 | + permission("cpp_example.command") |
24 | 24 | .description("Allow users to use all commands provided by this example plugin")
|
25 | 25 | .children("cpp_example.command.debug", true)
|
26 | 26 | .children("cpp_example.command.fibonacci", true);
|
27 | 27 |
|
28 |
| - plugin.permission("cpp_example.command.debug") |
| 28 | + permission("cpp_example.command.debug") |
29 | 29 | .description("Allow users to use the debug command")
|
30 | 30 | .default_(endstone::PermissionDefault::Operator);
|
31 | 31 |
|
32 |
| - plugin.permission("cpp_example.command.fibonacci") |
| 32 | + permission("cpp_example.command.fibonacci") |
33 | 33 | .description("Allow users to use the fibonacci command")
|
34 | 34 | .default_(endstone::PermissionDefault::True)
|
35 | 35 | .children("cpp_example.command.fibonacci.large_n", true);
|
36 | 36 |
|
37 |
| - plugin.permission("cpp_example.command.fibonacci.large_n") |
| 37 | + permission("cpp_example.command.fibonacci.large_n") |
38 | 38 | .description("Allow users to use the fibonacci command with n >= 1000")
|
39 | 39 | .default_(endstone::PermissionDefault::Operator);
|
40 | 40 | }
|
0 commit comments