コード例 #1
0
        private static void Main()
        {
            var pluginServer = new PluginServer();


            //game event handlers
            pluginServer.Plugin(new SavedPositionHandler());
            pluginServer.Plugin(new DrainHandler());
            pluginServer.Plugin(new ThawHandler());
            var createHandler = new CreateHandler();

            pluginServer.Plugin(createHandler);
            pluginServer.Plugin(new ScriptHandler(createHandler));
            pluginServer.Plugin(new SchematicHandler());
            pluginServer.Plugin(new ChatLogHandler());
            //local hotkey handlers.
            pluginServer.Plugin(new RadiusHandler());
            pluginServer.Plugin(new LandSculptHandler());


            Console.CancelKeyPress += delegate(object sender, ConsoleCancelEventArgs e)
            {
                e.Cancel = true;
                pluginServer.Stop();
            };

            pluginServer.Start("WorldEdit", 12112);
        }
コード例 #2
0
        public void Handle(string[] args, IMinecraftCommandService minecraftService)
        {
            var position = minecraftService.GetLocation();

            for (var i = 0; i <= RadiusHandler.Radius; i++)
            {
                CreateHandler.CreateGeometry(minecraftService, "create", "circle", $"{i}", "1", "air", $"{position.X}", $"{position.Y+i}", $"{position.Z}");
                //minecraftService.Command($"fill ~-{i} ~{i} ~-{i} ~{i} ~{i} ~{i} air");
            }
        }
コード例 #3
0
 public ScriptHandler(CreateHandler handler)
 {
     _handler    = handler;
     ChatCommand = "script";
 }
コード例 #4
0
 public RunCreatesHandler(CreateHandler handler)
 {
     _handler    = handler;
     ChatCommand = "script";
 }