From 169e4fd75f28e0c0c7a24049353042618895d2b5 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 1 Apr 2023 14:22:02 +0200 Subject: [PATCH] Fix AI --- .../de/steamwar/schematicsystem/SchematicSystem.java | 2 ++ .../parts/AprilPart.java => AprilCommand.java} | 11 ++++------- .../schematiccommand/SchematicCommandInitializer.java | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) rename SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/{schematiccommand/parts/AprilPart.java => AprilCommand.java} (86%) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/SchematicSystem.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/SchematicSystem.java index d6b9480..3344644 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/SchematicSystem.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/SchematicSystem.java @@ -20,6 +20,7 @@ package de.steamwar.schematicsystem; import de.steamwar.message.Message; +import de.steamwar.schematicsystem.commands.AprilCommand; import de.steamwar.schematicsystem.commands.DownloadCommand; import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommandInitializer; @@ -38,6 +39,7 @@ public class SchematicSystem extends JavaPlugin { SchematicCommandInitializer.init(); new DownloadCommand(); + new AprilCommand(); Bukkit.getPluginManager().registerEvents(new PlayerEventListener(), this); } diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/AprilPart.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/AprilCommand.java similarity index 86% rename from SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/AprilPart.java rename to SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/AprilCommand.java index e0dbb80..da3955a 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/AprilPart.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/AprilCommand.java @@ -17,12 +17,10 @@ along with this program. If not, see . */ -package de.steamwar.schematicsystem.commands.schematiccommand.parts; +package de.steamwar.schematicsystem.commands; -import de.steamwar.command.AbstractSWCommand; import de.steamwar.command.SWCommand; import de.steamwar.schematicsystem.SchematicSystem; -import de.steamwar.schematicsystem.commands.schematiccommand.SchematicCommand; import de.steamwar.sql.SchematicData; import de.steamwar.sql.SchematicNode; import de.steamwar.sql.SteamwarUser; @@ -32,12 +30,11 @@ import java.io.IOException; import java.util.List; import java.util.Random; -@AbstractSWCommand.PartOf(SchematicCommand.class) -public class AprilPart extends SWCommand { +public class AprilCommand extends SWCommand { private static final Random random = new Random(); - public AprilPart() { - super(null); + public AprilCommand() { + super("ai"); } @Register("prompt") diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandInitializer.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandInitializer.java index 2bc28af..7245ead 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandInitializer.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/SchematicCommandInitializer.java @@ -32,6 +32,5 @@ public class SchematicCommandInitializer { new SavePart().setMessage(SchematicSystem.MESSAGE); new SearchPart().setMessage(SchematicSystem.MESSAGE); new ViewPart().setMessage(SchematicSystem.MESSAGE); - new AprilPart().setMessage(SchematicSystem.MESSAGE); } }