diff --git a/common/src/main/resources/languages/en.json b/common/src/main/resources/languages/en.json index cd9e0a7..3ededa3 100644 --- a/common/src/main/resources/languages/en.json +++ b/common/src/main/resources/languages/en.json @@ -9,6 +9,8 @@ "cmd.creature.create": "Created creature {0} of type {1}.", "cmd.creature.create.invalid": "A creature with that name already exists.", + "cmd.creature.delete": "Deleted {0}.", + "cmd.creature.list": "List of creatures: {0}", "cmd.creature.edit.skin.invalid": "{0} is not an existing player.", diff --git a/minestom/build.gradle b/minestom/build.gradle index 2e9d9e6..23898f8 100644 --- a/minestom/build.gradle +++ b/minestom/build.gradle @@ -36,12 +36,12 @@ minestomExtension { dependencies = ["BrickI18n"] } -shadowJar.doLast { - copy { - from "build/libs/" + archiveFileName.get() - into 'D:\\Documents\\testservers\\WollyMC\\lobby2\\extensions' - } -} +//shadowJar.doLast { +// copy { +// from "build/libs/" + archiveFileName.get() +// into 'D:\\Documents\\testservers\\WollyMC\\lobby2\\extensions' +// } +//} // //println project.configurations.runtimeClasspath.getResolvedConfiguration().getLenientConfiguration() diff --git a/minestom/src/main/java/com/guflimc/brick/creatures/minestom/MinestomBrickCreatures.java b/minestom/src/main/java/com/guflimc/brick/creatures/minestom/MinestomBrickCreatures.java index 1871658..795d5b3 100644 --- a/minestom/src/main/java/com/guflimc/brick/creatures/minestom/MinestomBrickCreatures.java +++ b/minestom/src/main/java/com/guflimc/brick/creatures/minestom/MinestomBrickCreatures.java @@ -11,7 +11,7 @@ import com.guflimc.brick.creatures.minestom.metadata.MinestomMetadataSerializer; import com.guflimc.brick.i18n.minestom.api.MinestomI18nAPI; import com.guflimc.brick.i18n.minestom.api.namespace.MinestomNamespace; -import io.github.openminigameserver.cloudminestom.MinestomCommandManager; +import com.guflimc.cloud.minestom.MinestomCommandManager; import net.minestom.server.command.CommandSender; import net.minestom.server.extensions.Extension; diff --git a/minestom/src/main/java/com/guflimc/brick/creatures/minestom/commands/MinestomCreaturesCommands.java b/minestom/src/main/java/com/guflimc/brick/creatures/minestom/commands/MinestomCreaturesCommands.java index 7206b07..2ea8ef0 100644 --- a/minestom/src/main/java/com/guflimc/brick/creatures/minestom/commands/MinestomCreaturesCommands.java +++ b/minestom/src/main/java/com/guflimc/brick/creatures/minestom/commands/MinestomCreaturesCommands.java @@ -33,7 +33,7 @@ public MinestomCreaturesCommands(MinestomCreatureManager manager) { public List creatureSuggestion(CommandContext sender, String input) { return manager.creatures().stream() .map(PersistentCreature::name) - .filter(name -> name.startsWith(input)) +// .filter(name -> name.startsWith(input)) .collect(Collectors.toList()); } @@ -41,27 +41,19 @@ public List creatureSuggestion(CommandContext sender, String i public List spawnSuggestion(CommandContext sender, String input) { return manager.spawns().stream() .map(PersistentSpawn::name) - .filter(name -> name.startsWith(input)) - .collect(Collectors.toList()); - } - - @Suggestions("entityType") - public List entityTypeSuggestion(CommandContext sender, String input) { - return EntityType.values().stream() - .map(ProtocolObject::name) - .filter(name -> name.startsWith(input)) +// .filter(name -> name.startsWith(input)) .collect(Collectors.toList()); } @CommandMethod("bc creature create ") - public void creatureCreate(Audience sender, @Argument(value = "name") String name, @Argument(value = "type") String type) { + public void creatureCreate(Audience sender, @Argument(value = "name") String name, @Argument(value = "type") EntityType type) { if (manager.creature(name).isPresent()) { I18nAPI.get(this).send(sender, "cmd.creature.create.invalid", name); return; } - manager.persist(name, EntityType.fromNamespaceId(type)); - I18nAPI.get(this).send(sender, "cmd.creature.create", name, type); + manager.persist(name, type); + I18nAPI.get(this).send(sender, "cmd.creature.create", name, type.name()); } @CommandMethod("bc creature delete ") diff --git a/settings.gradle b/settings.gradle index 27cdc6e..ee35769 100644 --- a/settings.gradle +++ b/settings.gradle @@ -11,3 +11,5 @@ include 'api' include 'common' include 'minestom' +//includeBuild '../cloud-minestom' +