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); }
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"); } }
public ScriptHandler(CreateHandler handler) { _handler = handler; ChatCommand = "script"; }
public RunCreatesHandler(CreateHandler handler) { _handler = handler; ChatCommand = "script"; }