Inheritance: BasePlugin
コード例 #1
0
ファイル: House.cs プロジェクト: Ricealso/House
        public override void Load()
        {
            Name = "House";
            Description = "A plugin to allow players to define safe areas";
            Author = "amarriner";
            Version = "0.3.6.1";
            TDSMBuild = 31;

            plugin = this;

            this.registerHook(Hooks.PLAYER_TILECHANGE);
            this.registerHook(Hooks.PLAYER_CHEST);
            this.registerHook(Hooks.PLAYER_EDITSIGN);
            this.registerHook(Hooks.DOOR_STATECHANGE);
            this.registerHook(Hooks.TIME_CHANGED);
            this.registerHook(Hooks.PLAYER_FLOWLIQUID);

            AddCommand("h")
                .WithAccessLevel(AccessLevel.PLAYER)
                .WithDescription("House Commands, type /house ? for help")
                .WithHelpText("/house <command> <parameter> <parameter>")
                .Calls(Commands.Commands.house);

            AddCommand("house")
                .WithAccessLevel(AccessLevel.PLAYER)
                .WithDescription("House Commands, type /house ? for help")
                .WithHelpText("/house <command> <parameter> <parameter>")
                .Calls(Commands.Commands.house);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: MatBylin/csharp-exercises
 public Person(string name, House house)
 {
     this.name  = name;
     this.house = house;
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: MatBylin/csharp-exercises
 public Person()
 {
     name  = "mateusz";
     house = new House(666);
 }
コード例 #4
0
ファイル: House.cs プロジェクト: elevatorguy/House
        protected override void Initialized(object state)
        {
            plugin = this;

            AddCommand("h")
                .WithAccessLevel(AccessLevel.PLAYER)
                .WithDescription("House Commands, type /house ? for help")
                .WithHelpText("/house <command> <parameter> <parameter>")
                .Calls(Commands.Commands.house);

            AddCommand("house")
                .WithAccessLevel(AccessLevel.PLAYER)
                .WithDescription("House Commands, type /house ? for help")
                .WithHelpText("/house <command> <parameter> <parameter>")
                .Calls(Commands.Commands.house);
        }