You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to use them add a Refrence using Synapse.Events at the top and hook the Events from the Events class that you need.
Basic Example:
usingSynapse.Api.Plugin;usingSynapse.Events;namespaceExample{[PluginDetails(Author="Dimenzio",Description="My Awesome First Plugin!",Name="First-Plugin",SynapseMajor=1,SynapseMinor=0,SynapsePatch=0,Version="1.0.0")]publicclassExample:Plugin{publicoverridevoidOnEnable(){Log.Info("Hello");Events.PlayerJoinEvent+=this.OnJoin;}privatevoidOnJoin(PlayerJoinEventev){//Here can you Execute code that will be activated when a Player join. In ev are all informations about the Event like The Player that joins = ev.PlayerLog.Info($"{ev.Player.Nickname} joined the server!");}}}
If you understand it and maybe already test some Events you now want to add Configs to your Plugins to do it visit the Config Page