MCreator issue tracker has been migrated to GitHub.
Existing tickets have been migrated to GitHub. Please open new tickets on the GitHub tracker instead. If you do not have a GitHub account, all feature requests and bug reports from MCreator forums are still considered and checked by the maintainers.
This happens because MC has two sides. Client and server-side. Ensure that event only runs on the server-side.
More on https://mcreator.net/wiki/developing-multiplayer-compatible-mods