From 5c3513360d8bfebf5a40bb78d513cda322b985ed Mon Sep 17 00:00:00 2001 From: Vincent Date: Sun, 7 Apr 2024 00:18:26 +0100 Subject: [PATCH] refactor: update ENDSTONE_PLUGIN due to API change --- src/example_plugin.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/example_plugin.cpp b/src/example_plugin.cpp index cb22f1c..ec7bfa5 100644 --- a/src/example_plugin.cpp +++ b/src/example_plugin.cpp @@ -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 "}; + description = "C++ example plugin for Endstone servers"; + website = "https://github.com/EndstoneMC/cpp-example-plugin"; + authors = {"Endstone Developers "}; - 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 ") .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); }