Changing settings

Changing a setting is very easy. Here's an example of setting server.motd when your plugin installs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PartyCraftServer.Plugins;
using PartyCraftServer;
using LibMinecraft.Server;
using LibMinecraft.Model;

namespace TestPlugin
{
    public class TestPlugin : Plugin
    {
        public override string Name
        {
            get { return "Test plugin"; }
        }

        public override bool RequiresRestart
        {
            get { return false; }
        }

        public override void OnInstall()
        {
            PartyCraft.Settings["server.motd"] = "Now running test plugin!";
            base.OnInstall();
        }
    }
}

Last edited Jan 25, 2012 at 6:59 AM by sircmpwn, version 1

Comments

No comments yet.