Skip to content

Commit

Permalink
refactor: rename files
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Mar 6, 2024
1 parent cc9320d commit 0b5dd2d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15)

project(endstone_cpp_plugin CXX)
project(endstone_cpp_example_plugin CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down Expand Up @@ -59,7 +59,7 @@ target_link_libraries(endstone_headers INTERFACE fmt::fmt)
# ===============
# Build
# ===============
add_library(${PROJECT_NAME} SHARED src/endstone_cpp_plugin.cpp)
add_library(${PROJECT_NAME} SHARED src/example_plugin.cpp)
target_include_directories(${PROJECT_NAME} PUBLIC include)
target_link_libraries(${PROJECT_NAME} PRIVATE endstone::headers)

Expand Down
11 changes: 8 additions & 3 deletions include/endstone_cpp_plugin.h → include/example_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include "endstone/plugin/plugin.h"
#include "fibonacci_command.h"

class EndstoneCppPlugin : public endstone::Plugin {
class ExamplePlugin : public endstone::Plugin {
public:
EndstoneCppPlugin() = default;
ExamplePlugin() = default;
void onLoad() override
{
getLogger().info("onLoad is called");
Expand Down Expand Up @@ -48,5 +48,10 @@ class EndstoneCppPlugin : public endstone::Plugin {
}

private:
endstone::PluginDescription description_{"EndstoneCppPlugin", "0.1.0"};
endstone::PluginDescription description_{
"CppExamplePlugin", // name
"0.2.0", // version
"Official C++ example plugin for Endstone servers", // description
{"Endstone Developers <[email protected]>"} // authors
};
};
4 changes: 2 additions & 2 deletions src/endstone_cpp_plugin.cpp → src/example_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "endstone_cpp_plugin.h"
#include "example_plugin.h"

// The ENDSTONE_PLUGIN macro defines the entry point for the plugin.
ENDSTONE_PLUGIN(EndstoneCppPlugin)
ENDSTONE_PLUGIN(ExamplePlugin)

0 comments on commit 0b5dd2d

Please sign in to comment.