-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: update ENDSTONE_PLUGIN due to API change
- Loading branch information
1 parent
0405f01
commit 5c35133
Showing
1 changed file
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,36 +5,36 @@ | |
// The ENDSTONE_PLUGIN macro defines the metadata for the plugin. | ||
ENDSTONE_PLUGIN(/*name=*/"CppExamplePlugin", /*version=*/"0.4.0", /*main_class=*/ExamplePlugin) | ||
{ | ||
plugin.description = "C++ example plugin for Endstone servers"; | ||
plugin.website = "https://github.com/EndstoneMC/cpp-example-plugin"; | ||
plugin.authors = {"Endstone Developers <[email protected]>"}; | ||
description = "C++ example plugin for Endstone servers"; | ||
website = "https://github.com/EndstoneMC/cpp-example-plugin"; | ||
authors = {"Endstone Developers <[email protected]>"}; | ||
|
||
plugin.command("debug") | ||
command("debug") // | ||
.description("Print debug information.") | ||
.usages("/debug") | ||
.permissions("cpp_example.command.debug"); | ||
|
||
plugin.command("fibonacci") | ||
command("fibonacci") | ||
.description("A simple command that writes the Fibonacci series up to n.") | ||
.usages("/fibonacci <n: int>") | ||
.aliases("fib") | ||
.permissions("cpp_example.command.fibonacci", "cpp_example.command.fibonacci.large_n"); | ||
|
||
plugin.permission("cpp_example.command") | ||
permission("cpp_example.command") | ||
.description("Allow users to use all commands provided by this example plugin") | ||
.children("cpp_example.command.debug", true) | ||
.children("cpp_example.command.fibonacci", true); | ||
|
||
plugin.permission("cpp_example.command.debug") | ||
permission("cpp_example.command.debug") | ||
.description("Allow users to use the debug command") | ||
.default_(endstone::PermissionDefault::Operator); | ||
|
||
plugin.permission("cpp_example.command.fibonacci") | ||
permission("cpp_example.command.fibonacci") | ||
.description("Allow users to use the fibonacci command") | ||
.default_(endstone::PermissionDefault::True) | ||
.children("cpp_example.command.fibonacci.large_n", true); | ||
|
||
plugin.permission("cpp_example.command.fibonacci.large_n") | ||
permission("cpp_example.command.fibonacci.large_n") | ||
.description("Allow users to use the fibonacci command with n >= 1000") | ||
.default_(endstone::PermissionDefault::Operator); | ||
} |