FourKit 29eeeb8
The LCE C# Server Plugin API
Loading...
Searching...
No Matches
Minecraft.Server.FourKit.FourKit Class Reference

The main entry point for the FourKit plugin API. More...

Static Public Member Functions

static ? World getWorld (string name)
 Gets a world by its name. Supported names: "world" (overworld), "world_nether" (nether), "world_the_end" (the end).
static World getWorld (int dimId)
 Gets a world by its dimension ID (0 = overworld, -1 = nether, 1 = the end).
static void addListener (Listener listener)
 Registers all the events in the given listener class.
static ? Player getPlayer (string name)
static IReadOnlyList< PlayergetOnlinePlayers ()
static PluginCommand getCommand (string name)
 Gets a PluginCommand with the given name, creating it if it does not already exist. The returned command can be configured with PluginCommand.setExecutor, Command.setDescription, etc.
static void broadcastMessage (string message)
 Broadcasts a message to all online players.
static Inventory.Inventory createInventory (int size)
 Creates a new Inventory.Inventory with the specified size. The inventory will be of type InventoryType.CHEST with the default title.
static Inventory.Inventory createInventory (int size, string title)
 Creates a new Inventory.Inventory with the specified size and custom title.
static Inventory.Inventory createInventory (InventoryType type)
 Creates a new Inventory.Inventory of the specified InventoryType with the default title and size.
static Inventory.Inventory createInventory (InventoryType type, string title)
 Creates a new Inventory.Inventory of the specified InventoryType with a custom title.
static ? ServerPlugin getPlugin (string name)
 Checks if the given plugin is loaded and returns it when applicable.
static ServerPlugin[] getPlugins ()
 Gets a list of all currently loaded plugins.
static void enablePlugin (ServerPlugin plugin)
 Enables the specified plugin.
static void disablePlugin (ServerPlugin plugin)
 Disables the specified plugin.

Detailed Description

The main entry point for the FourKit plugin API.

Member Function Documentation

◆ broadcastMessage()

void Minecraft.Server.FourKit.FourKit.broadcastMessage ( string message)
static

Broadcasts a message to all online players.

Parameters
messageThe message to broadcast.

◆ createInventory() [1/4]

Inventory.Inventory Minecraft.Server.FourKit.FourKit.createInventory ( int size)
static

Creates a new Inventory.Inventory with the specified size. The inventory will be of type InventoryType.CHEST with the default title.

Parameters
sizeThe size of the inventory (must be a multiple of 9).
Returns
A new Inventory.

◆ createInventory() [2/4]

Inventory.Inventory Minecraft.Server.FourKit.FourKit.createInventory ( int size,
string title )
static

Creates a new Inventory.Inventory with the specified size and custom title.

Parameters
sizeThe size of the inventory (must be a multiple of 9).
titleThe title that will be shown to players.
Returns
A new Inventory.

◆ createInventory() [3/4]

Inventory.Inventory Minecraft.Server.FourKit.FourKit.createInventory ( InventoryType type)
static

Creates a new Inventory.Inventory of the specified InventoryType with the default title and size.

Parameters
typeThe type of inventory to create.
Returns
A new Inventory.

◆ createInventory() [4/4]

Inventory.Inventory Minecraft.Server.FourKit.FourKit.createInventory ( InventoryType type,
string title )
static

Creates a new Inventory.Inventory of the specified InventoryType with a custom title.

Parameters
typeThe type of inventory to create.
titleThe title that will be shown to players.
Returns
A new Inventory.

◆ disablePlugin()

void Minecraft.Server.FourKit.FourKit.disablePlugin ( ServerPlugin plugin)
static

Disables the specified plugin.

Parameters
pluginPlugin to disable.

◆ enablePlugin()

void Minecraft.Server.FourKit.FourKit.enablePlugin ( ServerPlugin plugin)
static

Enables the specified plugin.

Parameters
pluginPlugin to enable.

◆ getCommand()

PluginCommand Minecraft.Server.FourKit.FourKit.getCommand ( string name)
static

Gets a PluginCommand with the given name, creating it if it does not already exist. The returned command can be configured with PluginCommand.setExecutor, Command.setDescription, etc.

Parameters
nameName of the command.
Returns
The command for that name.

◆ getPlugin()

? ServerPlugin Minecraft.Server.FourKit.FourKit.getPlugin ( string name)
static

Checks if the given plugin is loaded and returns it when applicable.

Please note that the name of the plugin is case-sensitive.

Parameters
nameName of the plugin to check.
Returns
Plugin if it exists, otherwise null

◆ getPlugins()

ServerPlugin[] Minecraft.Server.FourKit.FourKit.getPlugins ( )
static

Gets a list of all currently loaded plugins.

Returns
The array of plugins.

◆ getWorld() [1/2]

World Minecraft.Server.FourKit.FourKit.getWorld ( int dimId)
static

Gets a world by its dimension ID (0 = overworld, -1 = nether, 1 = the end).

Parameters
dimIdThe dimension ID.
Returns
The world for that dimension, creating it if necessary.

◆ getWorld() [2/2]

? World Minecraft.Server.FourKit.FourKit.getWorld ( string name)
static

Gets a world by its name. Supported names: "world" (overworld), "world_nether" (nether), "world_the_end" (the end).

Parameters
nameThe name of the world to retrieve.
Returns
The world with the given name, or null if none exists.

The documentation for this class was generated from the following file:
  • Minecraft.Server.FourKit/FourKit.cs