-
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.
feat: add ExampleListener to handle events
- Loading branch information
1 parent
80eb9b3
commit 478193f
Showing
2 changed files
with
40 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) 2024, The Endstone Project. (https://endstone.dev) All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
#include "endstone/event/server/server_load_event.h" | ||
#include "endstone/plugin/plugin.h" | ||
|
||
class ExampleListener { | ||
public: | ||
explicit ExampleListener(endstone::Plugin &plugin) : plugin_(plugin) {} | ||
|
||
void onServerLoad(endstone::ServerLoadEvent &event) | ||
{ | ||
plugin_.getLogger().info("ServerLoadEvent is passed to ExampleListener::onServerLoad"); | ||
} | ||
|
||
private: | ||
endstone::Plugin &plugin_; | ||
}; |
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