Added lrcdb

This commit is contained in:
Auxilor
2022-10-28 13:16:09 +01:00
parent 32e0c98832
commit 2e0503f4d0
3 changed files with 41 additions and 2 deletions
@@ -1,12 +1,15 @@
package com.willfp.boosters.commands
import com.willfp.boosters.boosters.Boosters
import com.willfp.boosters.gui.BoosterGUI
import com.willfp.eco.core.EcoPlugin
import com.willfp.libreforge.LibReforgePlugin
import com.willfp.libreforge.lrcdb.CommandExport
import com.willfp.libreforge.lrcdb.CommandImport
import com.willfp.libreforge.lrcdb.ExportableConfig
import org.bukkit.command.CommandSender
import org.bukkit.entity.Player
class CommandBoosters(plugin: com.willfp.eco.core.EcoPlugin) :
class CommandBoosters(plugin: LibReforgePlugin) :
com.willfp.eco.core.command.impl.PluginCommand(
plugin,
"boosters",
@@ -19,6 +22,15 @@ class CommandBoosters(plugin: com.willfp.eco.core.EcoPlugin) :
.addSubcommand(CommandReload(plugin))
.addSubcommand(CommandCancel(plugin))
.addSubcommand(CommandActivate(plugin))
.addSubcommand(CommandImport("boosters", plugin))
.addSubcommand(CommandExport(plugin) {
Boosters.values().map {
ExportableConfig(
it.id,
it.config
)
}
})
}
override fun onExecute(sender: CommandSender, args: List<String>) {
@@ -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 /boosters export <config>.
@@ -43,6 +43,8 @@ permissions:
boosters.command.boosters: true
boosters.command.cancel: true
boosters.command.activate: true
boosters.command.import: true
boosters.command.export: true
boosters.command.reload:
description: Allows reloading the config
@@ -59,3 +61,9 @@ permissions:
boosters.command.cancel:
description: Allows the use of /boosters cancel.
default: op
boosters.command.import:
description: Allows the use of /boosters import
default: op
boosters.command.export:
description: Allows the use of /boosters export
default: op