Skip to content

Instantly share code, notes, and snippets.

View NiclasOlofsson's full-sized avatar

Niclas Olofsson NiclasOlofsson

View GitHub Profile
@NiclasOlofsson
NiclasOlofsson / gist:f07edb6df8de8ebc3a90
Created March 9, 2015 18:21
MiNET login command in plugin.
[Plugin("CoreCommands", "The core commands for MiNET", "1.0", "MiNET Team")]
public class CoreCommands : Plugin
{
[Command]
public void Login(Player player, string password)
{
UserManager<User> userManager = player.Server.UserManager;
if (userManager != null)
{
if (player.Username == null) return;
[Plugin]
public class StartupPlugin : Plugin, IStartup
{
private static readonly ILog Log = LogManager.GetLogger(typeof (StartupPlugin));
/// <summary>
/// Startup class for MiNET. Example sets the user and role managers and stores
/// for the application.
/// </summary>
/// <param name="server"></param>