Shard

abstract class Shard

The base class for all shards.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
lateinit var dataFolder: File

The data folder for this shard. You can use this folder to store data for your shard, such as configuration files.

Link copied to clipboard
@ApiStatus.Internal
var info: ShardInfo?

The shard info for this shard. This contains information about the shard, such as the name, version, and author.

Link copied to clipboard
@ApiStatus.Internal
var isSetup: Boolean

Whether this shard has been through the setup process.

Link copied to clipboard
@get:ApiStatus.Internal
val jarLocation: URL?

This is where the jar file is located.

Link copied to clipboard
@ApiStatus.Internal
lateinit var loader: ShardClassLoader

The classloader for this shard. Generally safe to never touch this.

Link copied to clipboard
@ApiStatus.Internal
lateinit var shardHelper: ShardHelper

The shard helper for this shard. You should never need to touch this, as it is used by methods within this class.

Functions

Link copied to clipboard
abstract fun create()

The setup method for this shard. This method will be called when the shard is loaded.

Link copied to clipboard
abstract fun delete()

The destroy method for this shard. This method will be called when the shard is unloaded.

Link copied to clipboard
Link copied to clipboard
open fun presetup()

This is called prior to the Shard.create method. Allowing you to perform any pre-setup actions.