diff --git a/build.gradle.kts b/build.gradle.kts index 95c7cce..b9de88e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -41,7 +41,7 @@ allprojects { compileOnly("org.jetbrains:annotations:23.0.0") compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.7.10") - implementation("com.willfp:libreforge:3.111.1") + implementation("com.willfp:libreforge:3.112.0") implementation("org.joml:joml:1.10.4") } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/commands/CommandEcobosses.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/commands/CommandEcobosses.kt index 4d4c334..13ef2a4 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/commands/CommandEcobosses.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/commands/CommandEcobosses.kt @@ -2,6 +2,10 @@ package com.willfp.ecobosses.commands import com.willfp.eco.core.command.impl.PluginCommand import com.willfp.ecobosses.EcoBossesPlugin +import com.willfp.ecobosses.bosses.Bosses +import com.willfp.libreforge.lrcdb.CommandExport +import com.willfp.libreforge.lrcdb.CommandImport +import com.willfp.libreforge.lrcdb.ExportableConfig import org.bukkit.command.CommandSender class CommandEcobosses(plugin: EcoBossesPlugin) : PluginCommand( @@ -22,5 +26,14 @@ class CommandEcobosses(plugin: EcoBossesPlugin) : PluginCommand( .addSubcommand(CommandKillall(plugin)) .addSubcommand(CommandSpawn(plugin)) .addSubcommand(CommandGive(plugin)) + .addSubcommand(CommandImport("bosses", plugin)) + .addSubcommand(CommandExport(plugin) { + Bosses.values().map { + ExportableConfig( + it.id, + it.config + ) + } + }) } } diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index 20c0db7..326b237 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -45,6 +45,4 @@ potions: triggered: true particles: permanent: false - triggered: true - -share-configs: true # If your configs are allowed to be used to gather data and improve the plugin. Nothing identifying (IP, Name, etc) is shared. \ No newline at end of file + triggered: true \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index 2c7fa8b..0578455 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -19,5 +19,12 @@ messages: cannot-afford: "&cYou can't afford to do this! &fCost: &a$$%cost%" cannot-afford-type: "&cYou can't afford to do this! &fCost: &a%cost% %type%" cannot-transmit: "&cYou can't transmit here!" + must-specify-lrcdb-id: "&cYou must specify the ID of the config to download! Not sure what this means? Go to &alrcdb.auxilor.io" + lrcdb-import-error: "&cError importing config: &f%message%" + lrcdb-import-success: "&fImported &a%name%&f! Reload the plugin to install it" + must-specify-config-name: "&cYou must specify the config name!" + invalid-config-name: "&cInvalid config name!" + lrcdb-export-error: "&cError exporting config: &f%message%" + lrcdb-export-success: "&fExported &a%name%&f! View it on &alrcdb.auxilor.io&f, or share your config ID: &f%id%" na: "N/A" \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/lrcdb.yml b/eco-core/core-plugin/src/main/resources/lrcdb.yml new file mode 100644 index 0000000..ddddd4f --- /dev/null +++ b/eco-core/core-plugin/src/main/resources/lrcdb.yml @@ -0,0 +1,19 @@ +# Options for lrcdb (https://lrcdb.auxilor.io), a website to share configs +# with other server owners, so you can get more configs without making them +# yourself! + +author: "Unknown Author" # The name attached to configs you export + +# Options about automatically sharing configs you create +share-configs: + # If you want all your configs to automatically be publicly available, + # set this to true. This really helps out other users! + publicly: false + + # If you don't want your configs to be usable to gather information about + # plugin usage or to improve the plugins in the future, disable this. + # Nothing identifying is shared. + enabled: true + +# If you disable share-configs, you can still share select configs publicly +# with /ecobosses export . \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/plugin.yml b/eco-core/core-plugin/src/main/resources/plugin.yml index 27aac23..f56756f 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -42,6 +42,8 @@ permissions: ecobosses.command.reload: true ecobosses.command.spawn: true ecobosses.command.give: true + ecobosses.command.import: true + ecobosses.command.export: true ecobosses.command.ecobosses: description: Allows the use of /ecobosses @@ -61,4 +63,12 @@ permissions: ecobosses.command.reload: description: Allows the use of /ecobosses reload + default: op + + ecobosses.command.import: + description: Allows the use of /ecobosses import + default: op + + ecobosses.command.export: + description: Allows the use of /ecobosses export default: op \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 102a1a1..bd2afc5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ #libreforge-updater -#Mon Oct 10 21:04:32 BST 2022 -version=8.97.1 +#Thu Oct 13 20:13:11 BST 2022 +version=8.98.0 plugin-name=EcoBosses