From df760c4c5c73d3a3a40713ca7d2f81b1567c78cb Mon Sep 17 00:00:00 2001 From: Tides Date: Thu, 28 Nov 2024 15:50:47 -0600 Subject: [PATCH] Delete --- SamplePlugin/SamplePlugin.cs | 92 -------------------------------- SamplePlugin/SamplePlugin.csproj | 43 --------------- SamplePlugin/plugin.json | 17 ------ SamplePlugin/signing_key.xml | 16 ------ 4 files changed, 168 deletions(-) delete mode 100644 SamplePlugin/SamplePlugin.cs delete mode 100644 SamplePlugin/SamplePlugin.csproj delete mode 100644 SamplePlugin/plugin.json delete mode 100644 SamplePlugin/signing_key.xml diff --git a/SamplePlugin/SamplePlugin.cs b/SamplePlugin/SamplePlugin.cs deleted file mode 100644 index 52c85e1b..00000000 --- a/SamplePlugin/SamplePlugin.cs +++ /dev/null @@ -1,92 +0,0 @@ -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using Obsidian.API; -using Obsidian.API.Commands; -using Obsidian.API.Events; -using Obsidian.API.Plugins; -using System.Threading.Tasks; - -namespace SamplePlugin; - public sealed class SamplePlugin : PluginBase -{ - // Dependencies will be injected automatically, if dependency class and field/property names match - // Plugins won't load until all their required dependencies are added - // Optional dependencies may be injected at any time, if at all - [Inject] - public ILogger Logger { get; set; } - - //You can register services, commands and events here if you'd like - public override void ConfigureServices(IServiceCollection services) { } - - //You can register commands, events and soon to be items, blocks and entities - public override void ConfigureRegistry(IPluginRegistry registry) - { - //Will scan for command classes and register them for you - registry.MapCommands(); - - //Will scan for classes that inherit from MinecraftEventHandler - registry.MapEvents(); - - //For those coming from the web side of .net these will seem familiar to you. - //You're able to register commands through a "minimal api" like approach - registry.MapCommand("test", - [CommandInfo("test command")] - async (CommandContext ctx, int number, int otherNumber) => - { - await ctx.Player.SendMessageAsync($"Test #{number} and #{otherNumber}. This command was executed from the MinimalAPI."); - }); - - //As above so below :)) - registry.MapEvent((IncomingChatMessageEventArgs chat) => - { - this.Logger.LogDebug("Got a chat message! From MinimalAPI event."); - }); - } - - //Called when the plugin has fully loaded - public override ValueTask OnLoadedAsync(IServer server) - { - Logger.LogInformation("§a{pluginName} §floaded! Hello §aEveryone§f!", Info.Name); - - return ValueTask.CompletedTask; - } - - //Called when the world has loaded and the server is ready for connections - public override ValueTask OnServerReadyAsync(IServer server) - { - Logger.LogInformation("Wow you can join the server!!"); - return ValueTask.CompletedTask; - } - - //This is self explanatory (called when the plugin is being unloaded) - public override ValueTask OnUnloadingAsync() - { - Logger.LogInformation("I'm unloading now :("); - return ValueTask.CompletedTask; - } -} - -//All event handlers are created with a scoped lifetime -public class MyEventHandler : MinecraftEventHandler -{ - [EventPriority(Priority = Priority.Critical)] - public async ValueTask ChatEvent(IncomingChatMessageEventArgs args) - { - await args.Player.SendMessageAsync("I got your chat message through event handler class!"); - } -} - -//All command modules are created with a scoped lifetime -public class MyCommands : CommandModuleBase -{ - [Inject] - public ILogger Logger { get; set; } - - [Command("mycommand")] - [CommandInfo("woop dee doo this command is from a plugin")] - public async Task MyCommandAsync() - { - Logger.LogInformation("Testing Services as injected dependency"); - await this.Player.SendMessageAsync("Hello from plugin command!"); - } -} diff --git a/SamplePlugin/SamplePlugin.csproj b/SamplePlugin/SamplePlugin.csproj deleted file mode 100644 index be0bfae3..00000000 --- a/SamplePlugin/SamplePlugin.csproj +++ /dev/null @@ -1,43 +0,0 @@ - - - - net9.0 - false - false - Library - true - true - false - - SamplePlugin - 1.0.0.0 - 1.0.0 - bin/$(Configuration)/ - signing_key.xml - - - - - - runtime - - - - - - - false - runtime - - - - - - PreserveNewest - - - - - diff --git a/SamplePlugin/plugin.json b/SamplePlugin/plugin.json deleted file mode 100644 index 8ff5b75d..00000000 --- a/SamplePlugin/plugin.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "Sample Plugin", - "id": "sample_plugin", - "version": "1.0", - "authors": [ - "Obsidian Team" - ], - "description": "My sample plugin.", - "projectUrl": "https://github.com/ObsidianMC/Obsidian", - "dependencies": [ - { - "id": "test_plugin", - "version": "1.0.0-beta", - "required": true - } - ] -} \ No newline at end of file diff --git a/SamplePlugin/signing_key.xml b/SamplePlugin/signing_key.xml deleted file mode 100644 index 7cb09cbb..00000000 --- a/SamplePlugin/signing_key.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - xgXiI3LxZhBvCU0XEqITCSPHhOhu4yMiAheBDgU4EphUoLvsMo6VDwMpoafeM6585n5D/5aC+zbxZCPAI4UD2FknCVikAYqOdpUYAhwIhTVoI1LrCF8/fL+gEH3hz6psu1ddpR2j2qzMZNe5gWfJv4acYLGR0rQ3cro2JOznvGKLVWq6fBBSWh3z5QujolskVGaaWerMF1i5A0MykWgucKrc1m9EnE17g8/z0zdtLZSNLkfVkzzqdNWD2g7jIowtfgw5GVUtYS8/aW9uDUyuDh+9648uEyQZkOe+ZZpq1fGUyhQO/zBDj48atyuG1dLg6qQ+XuoVB715Lgrzn2S/43IsNitvV219XvAFkcXmg+dvDJRaAN9PdJbGLFjUWoY0QNJG2mj2ZTMm9Ge8bdX+E23Zi1OGlmvFGllg+guqJWspPzu8BFsVY2NfZA7XhcCT99KrC3MK8Xmn8RCXpW6hD3KUL7YqYCTdTl7HJ1ozDqOSwa9WRHtzqWP0noBnida/ - - AQAB -

- 6VTDu0JIlGyj0MEqnpcNggTaQuywn8KPAmLQYtfPQM4tDH6fJS/2Zz9WUnWAwdg5rJ1vPDHHfHExl2XeUJm/ORYiVYxWCbUmgUbRxsFxvyuGceFaGSCetMiJAUxgaNYVGBwPROPJs5G0PkdyjTMU9L3TQK+HkZM37ZcHkhtkOAVz/ybvUjd35Q/pIqxiwfeXj6h95VoY0C9dproh3NNsaZeigjVXAL19nAp4AeBT+z8/8qRzHuFKCA+986wIGpuz -

- - 2UL2K6tTw3niPUINE1RhoMJ+pzenrvTdv2DZUeqYXju9xDsDP2tggsR04J0bNQmtie5pVAsuKQGyKJS9Bq2ytFIwpA33JS1/GO7wgAUuUyTJqtcrcy8SsX4T67HsrFX8JuvhUC3dwbFcewH0Y5FJ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