-
Notifications
You must be signed in to change notification settings - Fork 2
Server Function Document
This is some world instance functions based on the BukkitAPI, written based on BukkitAPI/Minecraft 1.16.5, so some properties may not be effective (this feature will continue to be expanded and optimized in the future)
Here's a brief explanation: This type of function is abbreviated as preset function, which only provides preset packaging for some original functions in the Bukkit API.
Basic Format: [FunctionName]:[Options]...
If the expression already contains a colon : , you can escape it by adding a back slash \ in front to avoid recognizing the segment symbol. (For example \: )
Click the function name to view details.
The function name and effect are explained by BukkitAPI JavaDoc
| Function Name | Action |
|---|---|
BanIP |
Bans the specified address from the server |
BroadcastMessage |
Broadcast a message to all players. |
ClearRecipes |
Clears the list of crafting recipes. |
CreateWorld |
Creates or loads a world with the given name using the specified options. |
DispatchCommand |
Dispatches a command on this server, and executes it if found. |
Reload |
Reloads the server, refreshing settings and plugin information. |
ReloadData |
Reload only the Minecraft data for the server. This includes custom advancements and loot tables. |
ReloadWhitelist |
Reloads the whitelist from disk. |
ResetRecipes |
Resets the list of crafting recipes to the default. |
SavePlayers |
Writes loaded players to disk. |
SetDefaultGameMode |
Sets the default GameMode for new players. |
SetIdleTimeout |
Set the idle kick timeout. Any players idle for the specified amount of time will be automatically kicked. |
SetMotd |
Set the MOTD of the server |
SetSpawnRadius |
Sets the radius, in blocks, around each worlds spawn point to protect. |
SetWhitelist |
Sets if the server is whitelisted. |
Shutdown |
Shutdowns the server, stopping everything. |
UnbanIP |
Unbans the specified address from the server. |
UnloadWorld |
Unloads a world with the given name. |
PluginManager |
Plugin Manager Functions. |
Action: Bans the specified address from the server
Format: BanIP:[Address]
Example: 'BanIP:127.0.0.1' #Ban IP 127.0.0.1
Action: Broadcast a message to all players.
Format: BroadcastMessage:[Message]
Example: 'BroadcastMessage:&aTest broadcast'
Action: Clears the list of crafting recipes.
Format: ClearRecipes (No params)
Action: Creates or loads a world with the given name using the specified options.
Note that the world created by the plugin will not be automatically loaded when the server is started, so the plugin needs to perform additional world loading every time the server is started.
Format:
CreateWorld:[WorldName]CreateWorld:[WorldName]:[Options]
About Options:
All parameters are optional, if not filled in, they will be the default for the game
The format of this parameter is JSON format and includes the following optional options:
-
Environment: Sets the environment that will be used to create or load the world (NORMAL, NETHER, THE_END) -
GenerateStructures: Sets whether or not worlds created or loaded with this creator will have structures (true or false) -
Hardcore: Sets whether the world will be hardcore or not. In a hardcore world the difficulty will be locked to hard (true or false) -
Seed: Sets the seed that will be used to create this world (Must be a number) -
Type: Sets the type of the world that will be created or loaded (NORMAL, FLAT, LARGE_BIOMES, AMPLIFIED BUFFET) -
GeneratorSettings: Sets the generator settings of the world that will be created or loaded (It needs to be used in conjunction with the world type, for example: {"layers": [{"block": "stone", "height": 1}, {"block": "grass", "height": 1}], "biome":"plains"})
{
"Environment": "<Environment>",
"GenerateStructures": <true/false>,
"Hardcore": <true/false>,
"Seed": <Number>,
"Type": "<Type>",
"GeneratorSettings": {
<Settings>
}
}
Example:
- 'CreateWorld:TestWorld' #Create or load a world named TestWorld
- 'CreateWorld:TestWorld:{"Environment":"NETHER"}' #Create a nether world called TestWorld
- 'CreateWorld:TestWorld:{"Environment":"THE_END","GenerateStructures":false,"Seed":20150811}' #Create an end world called TestWorld that does not generate buildings, with seed number 20150811
- 'CreateWorld:TestWorld:{"Type":"FLAT","GeneratorSettings":{"layers":[{"block":"dirt","height":10}], "biome":"plains"}}' #Create a flat world called TestWorld, composed of dirt with a height of 10
Action: Dispatches a command on this server, and executes it if found.
Format: DispatchCommand:[Player]:[Command]
Example: 'DispatchCommand:Steve:say hello' #Steve: /say hello
Action: Reloads the server, refreshing settings and plugin information.
Format: Reload (No params)
Action: Reload only the Minecraft data for the server. This includes custom advancements and loot tables.
Format: ReloadData (No params)
Action: Reloads the whitelist from disk.
Format: ReloadWhitelist (No params)
Action: Resets the list of crafting recipes to the default.
Format: ResetRecipes (No params)
Action: Writes loaded players to disk.
Format: SavePlayers (No params)
Action: Sets the default GameMode for new players.
Format: SetDefaultGameMode:[GameMode]
Note: GameMode: CREATIVE, SURVIVAL, ADVENTURE, SPECTATOR
Example: 'SetDefaultGameMode:CREATIVE'
Action: Set the idle kick timeout. Any players idle for the specified amount of time will be automatically kicked.
Format: SetIdleTimeout:[Ticks]
Example: 'SetIdleTimeout:1200'
Action: Set the MOTD of the server
Format: SetMotd:[Text]
Note:
This function only applies to the current server state and will not be saved to a local file (which means that MOTD will be reset after restarting the server)
You can use "/n" to switch to the next line
Example: 'SetMotd:&bWelcome to/n&eMy server'
Action: Sets the radius, in blocks, around each worlds spawn point to protect.
Format: SetSpawnRadius:[Number]
Example: 'SetSpawnRadius:16'
Action: Sets if the server is whitelisted.
Format: SetWhitelist:[true/false]
Example: 'SetWhitelist:true'
Action: Shutdowns the server, stopping everything.
Format: Shutdown (No params)
Action: Unbans the specified address from the server.
Format: UnbanIP:[Address]
Example: 'UnbanIP:127.0.0.1' #Unban IP 127.0.0.1
Action: Unloads a world with the given name.
Format: UnloadWorld:[SaveWorld]:[WorldName]
Note: This function only unload a loaded world and does not delete its files.
Example: 'UnloadWorld:true:TestWorld'
Action: Manage plugins
Format: PluginManager:[SubFunction]
| Function | Action | Format |
|---|---|---|
| ClearPlugins | Disables and removes all plugins | 'PluginManager:ClearPlugins' (No params) |
| DisablePlugin | Disables the specified plugin | 'PluginManager:DisablePlugin:[PluginName]' |
| EnablePlugin | Enables the specified plugin | 'PluginManager:EnablePlugin:[PluginName]' |
| DisablePlugins | Disables all the loaded plugins | 'PluginManager:DisablePlugins' (No params) |
| LoadPlugin | Loads the plugin in the specified file | 'PluginManager:LoadPlugin:[Path/FileName.jar]' |
Example:
- 'PluginManager:DisablePlugin:LiteCommandEditor' #Uninstall the plugin called LiteCommandEditor
- 'PluginManager:LoadPlugin:LiteCommandEditor.jar' #Load the LiteCommandEditor.jar plugin file from the plugins folder
- 'PluginManager:LoadPlugin:C:\Windows\System32\Example.jar' #Load the Example.jar from C:\Windows\System32 folder