Rebar

The one and only Rebar plugin!

Properties

Link copied to clipboard
@get:NotNull
open val componentLogger: @NotNull ComponentLogger
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:NotNull
open val dataPath: @NotNull Path
Link copied to clipboard
Link copied to clipboard

The name used to represent this addon in the guide and other places.

Link copied to clipboard

The name used to represent this addon in the item tooltips. By default, a blue italic <your-addon-key>.addon translation key.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val javaPlugin: Rebar

Must return this

Link copied to clipboard
open override val key: NamespacedKey
Link copied to clipboard
open override val languages: Set<Locale>

The set of Locales this addon has translations for.

Link copied to clipboard
@get:NotNull
open val log4JLogger: @NotNull Logger
Link copied to clipboard
open val logger: Logger
Link copied to clipboard
Link copied to clipboard
open override val material: Material

The material to represent this addon in menus.

Link copied to clipboard
@get:NotNull
val name: @NotNull String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val scope: CoroutineScope

By default, dispatches on the main thread

Link copied to clipboard
Link copied to clipboard
@get:NotNull
open val slF4JLogger: @NotNull Logger
Link copied to clipboard
@get:JvmName(name = "suppressAddonNameWarning")
open val suppressAddonNameWarning: Boolean

If you use something besides the default <your-addon-key>.addon translation key for the addon name, set this to true to suppress warnings about the "missing" key.

Link copied to clipboard
@get:JvmName(name = "getTranslatorForAddon")
val RebarAddon.translator: RebarTranslator

Functions

Link copied to clipboard
open fun getCommand(name: String): @Nullable PluginCommand?
Link copied to clipboard
open fun getDefaultBiomeProvider(worldName: String, id: @Nullable String?): @Nullable BiomeProvider?
Link copied to clipboard
open fun getDefaultWorldGenerator(worldName: String, id: @Nullable String?): @Nullable ChunkGenerator?
Link copied to clipboard
open override fun getKey(): NamespacedKey
Link copied to clipboard
open fun getResource(filename: String): @Nullable InputStream?
Link copied to clipboard
fun init(loader: PluginLoader, server: Server, description: PluginDescriptionFile, dataFolder: File, file: File, classLoader: ClassLoader)
fun init(server: Server, description: PluginDescriptionFile, dataFolder: File, file: File, classLoader: ClassLoader, configuration: @Nullable PluginMeta?, logger: Logger)
Link copied to clipboard
open fun key(): @NotNull Key
Link copied to clipboard
@NotNull
open fun namespace(): @NotNull String
Link copied to clipboard
open fun onCommand(sender: CommandSender, command: Command, label: String, args: Array<out String>): Boolean
Link copied to clipboard
open override fun onDisable()
Link copied to clipboard
open override fun onEnable()
Link copied to clipboard
open fun onLoad()
Link copied to clipboard
open fun onTabComplete(sender: CommandSender, command: Command, alias: String, args: Array<out String>): @Nullable List<String>??
Link copied to clipboard
open fun registerCommand(label: String, basicCommand: BasicCommand)
open fun registerCommand(label: String, description: @Nullable String?, basicCommand: BasicCommand)
open fun registerCommand(label: String, aliases: Collection<String>, basicCommand: BasicCommand)
open fun registerCommand(label: String, description: @Nullable String?, aliases: Collection<String>, basicCommand: BasicCommand)
Link copied to clipboard
@ApiStatus.NonExtendable
open fun registerWithRebar()

Must be called as the first thing in your plugin's onEnable

Link copied to clipboard
open fun reloadConfig()
Link copied to clipboard
open fun saveConfig()
Link copied to clipboard
Link copied to clipboard
open fun saveResource(resourcePath: String, replace: Boolean)