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 or not 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.

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.