Skip to content

addemod/markers

Repository files navigation

Addemod/markers

License Build Status Release Version

A plugin to simplify marker usage in NFive plugin development.

Please note that this is not a plugin that you solely use alone. Its for plugin developers that want to simplify their development process when creating markers.

Installation

Install the plugin into your server from the NFive Hub:

nfpm install Addemod/markers

To correctly add this plugin as a dependency to your project, run the install command at the root folder of your project.

Usage

Server

private MarkersManager markerManager;

public MyPluginController(ILogger logger, Configuration configuration, ICommunicationManager comms, MarkersManager markerManager): base(logger, configuration)
{
	this.markerManager = markerManager;

	// Send configuration when requested
	comms.Event(MyPluginEvents.Configuration).FromClients().OnRequest(e => e.Reply(this.Configuration));
}

Events

Client

MarkerEntered

Triggered when a player entered a marker

void MarkerEnteredEvent(ICommunicationMessage e, Marker marker) { /*  Do stuff */ }

MarkerLeft

Triggered when a player left a marker

void MarkerLeftEvent(ICommunicationMessage e, Marker marker) { /*  Do stuff */ }

MarkerClicked

Triggered if a marker has "clicking" enabled, and the player clicked the defined key for this marker

void MarkerClickedEvent(ICommunicationMessage e, Marker marker) { /*  Do stuff */ }