Added lrcdb
This commit is contained in:
+14
-2
@@ -1,12 +1,15 @@
|
|||||||
package com.willfp.boosters.commands
|
package com.willfp.boosters.commands
|
||||||
|
|
||||||
|
import com.willfp.boosters.boosters.Boosters
|
||||||
import com.willfp.boosters.gui.BoosterGUI
|
import com.willfp.boosters.gui.BoosterGUI
|
||||||
import com.willfp.eco.core.EcoPlugin
|
|
||||||
import com.willfp.libreforge.LibReforgePlugin
|
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.command.CommandSender
|
||||||
import org.bukkit.entity.Player
|
import org.bukkit.entity.Player
|
||||||
|
|
||||||
class CommandBoosters(plugin: com.willfp.eco.core.EcoPlugin) :
|
class CommandBoosters(plugin: LibReforgePlugin) :
|
||||||
com.willfp.eco.core.command.impl.PluginCommand(
|
com.willfp.eco.core.command.impl.PluginCommand(
|
||||||
plugin,
|
plugin,
|
||||||
"boosters",
|
"boosters",
|
||||||
@@ -19,6 +22,15 @@ class CommandBoosters(plugin: com.willfp.eco.core.EcoPlugin) :
|
|||||||
.addSubcommand(CommandReload(plugin))
|
.addSubcommand(CommandReload(plugin))
|
||||||
.addSubcommand(CommandCancel(plugin))
|
.addSubcommand(CommandCancel(plugin))
|
||||||
.addSubcommand(CommandActivate(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>) {
|
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.boosters: true
|
||||||
boosters.command.cancel: true
|
boosters.command.cancel: true
|
||||||
boosters.command.activate: true
|
boosters.command.activate: true
|
||||||
|
boosters.command.import: true
|
||||||
|
boosters.command.export: true
|
||||||
|
|
||||||
boosters.command.reload:
|
boosters.command.reload:
|
||||||
description: Allows reloading the config
|
description: Allows reloading the config
|
||||||
@@ -59,3 +61,9 @@ permissions:
|
|||||||
boosters.command.cancel:
|
boosters.command.cancel:
|
||||||
description: Allows the use of /boosters cancel.
|
description: Allows the use of /boosters cancel.
|
||||||
default: op
|
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
|
||||||
Reference in New Issue
Block a user