Commands - CryptoMorin/KingdomsX GitHub Wiki

All the kingdoms commands are accessed from a main command /kingdoms
Aliases:

  • /kingdomx
  • /kingdomsx
  • /kingdom
  • /k

The main name and its aliases can be changed in config.yml.

All the command names and aliases are customizable inside language files. With their entries being commands.[groups].name and commands.[groups].description and commands.[groups].aliases (Aliases are separated by space.) It's also possible to create a main command such as /claim as an alias for /k claim, but you have to do this from commands.yml in your server's root folder (where your spigot.yml and world folder is)

aliases:
  icanhasbukkit:
    - version $1-
  claim:
    - k claim
  ally:
    - k chat a

If you want to disable a command entirely, it's recommended that you disable it via config.yml instead of removing the permission.
Also, it's possible to disable commands per WorldGuard region, for example if you don't want players to use /k fly in certain regions, you can use the command /rg flag <region> blocked-cmds k_fly

You can read about command permissions on the Permissions page.
Command options (arguments) are either in <> or [] Options:

  • <required> - You must to use this argument in the command.
  • [optional] - This argument can be used in the command. The parameter names that are possible to be used in that specific parameter, are separated with / (e.g. <first/second/third/...>)
    All these rules mostly follow the official Minecraft command syntax.

Nation commands are not mentioned here since their purpose are quite similar to the kingdoms' commands.

Tab Completion

When you're writing a command such as /k cla you'll notice that the plugin will suggest a few commands with a small box above your chat box. To use one of the suggested commands, you can use the Tab key to navigate through this list and select one of the suggestions without writing the full command yourself. The plugin takes advantage of the new Minecraft command system and provides a very smart tab completion system. Unlike other plugins, this plugin will go through multiple analysis of your message and suggest the best matches that it can find. This robust system saves your players from going through the help page one by one just to find a command.

This system also works with translated commands and removes any duplicated suggestions.

Certain commands have arguments that aren't names of other players, kingdoms or nations. These arguments help the command to adjust its settings such as #KINGDOM and #PLAYER selectors which can be used to specify what the name you're passing to the command is referring to exactly. These can be translated for different languages, but if you ever wanted to use these commands in a config, you should always use the English identifiers since those always work regardless of the player's locale.

Selectors

Command selectors are words use to help some commands pick exact values when there are more than one possibilities. The concept is similar to Minecraft's target selectors for commands.

General Selectors

For example, when using /k show command, you could just write /k show <name>, most people would assume that refers to a kingdom name since you're requesting information of a kingdom, but other times it's more convenient to write the player name instead and let the plugin check the kingdom they're in, so the plugin accepts both, but this causes an ambiguity issue. If a player have the same name as a kingdom, the plugin will prioritize the kingdom name, but sometimes you just want to be more precise if you don't want to memorize the ordering rules (or more importantly fore admins, you don't want a fail-safe behavior and execute certain important commands for the wrong kingdom)

For these reasons, general selectors are defined as follows: #NATION: The specified name is for a nation. #KINGDOM: The specified name is for a kingdom. #PLAYER: The specified name is for a player.

These are the default English identifiers (which admins should use in configs), but they might differ for different languages.
When none of them are specified, the plugin checks the names in the order they're specified above.

Examples:

  • /k nation show test: First checks if test is a nation name, if not, checks if it's a kingdom name, if not, checks if it's a player name, and if not, it'll fail.
  • /k show #PLAYER Domingo: Checks if a player with the name Domingo exists (doesn't matter if they're online or not) and if they're in a kingdom, otherwise fails.
  • /k show #KINGDOM CORE: Checks if a kingdom with the name CORE exists, otherwise fails.


Commands

Players

/k help

Syntax: /k help [ page | command ]
Opens the interactive kingdoms help pages for the players. Only the commands that players have permission to are displayed in this list. So if you're op, you can see all the commands, or... can you?
Options:

  • [page] The page number.
  • [command] Gets information about a specific command. This command is similar to /k admin command but with reduced information for players.

/k create

Syntax: /k create <name>
Create a new kingdom with the specified name. Duplicated and blacklisted names depend on the config options. This also can cost money if you're using Vault. Can be changed in config.yml -> economy
Options:

  • <name> The name of the kingdom. Must follow the naming convention specified in config.yml -> kingdoms-name

/k rename

Syntax: /k rename <name>
Rename your kingdom. Duplicated and blacklisted names depend on the config options. This also can cost money if you're using Vault. Can be changed in config.yml -> economy
Options:

  • <name> The new name of the kingdom. Must follow the naming convention specified in config.yml -> kingdoms-name

/k claim

Claims the current land that the player is standing on.

/k claim
  • x The x axis of the chunk you want to claim. <y> Used only if [x] parameter from the previous parameter is used. The y axis of the chunk you want to claim. This is mostly meant to be used when players click on claims in /k map
/k claim auto

Begin to automatically claim lands as you go from one chunk to another. This will start by attempting to claim the current land you're standing in.

The following commands don't instantly claim the chunks, but adds them to a clipboard where it shows which lands cannot be claimed and which will be claimed so the player can check and even add/remove extra lands and confirm the final process.

/k claim fill

Attempts to fill the shape (by claiming them) with connected borders that are marked by claimed lands. There are default limits to stop the server from lagging if the shape is not found or is too huge to claim. These options can be found in claims.yml -> fill

/k claim square

Claims a square with an area of radius*radius chunks.

/k claim corner < pos1 | pos2 >

This is simply just a WorldEdit //wand version of claiming. You go to a location and set /k claim corner pos1 then go to another location and /k claim corner pos2 and the plugin will get all the chunks between these two set corners as a rectangle.

/k claim line

Claims x chunks in a straight line where the player is facing.

/k claim clipboard

Shows all the selected lands from the previous claiming operations.

/k claim confirm

Confirms to claim all the lands in the clipboard.


/k unclaim

/k unclaim all

Unclaims all lands that don't have a turret or structure in them.


/k lore

Syntax: /k lore <description/remove>
Set your kingdom lore. This lore will display when players come from another land to your land. It might not display the lore depending if you came from the same land type. (Wilderness -> Wilderness, Another Kingdom -> Your Kingdom, etc...)
You need to have LORE kingdom permission to use this command.
Options:

  • <description> The description of the lore. Supports color codes and must follow the rules specified in config.yml -> kingdoms-lore There also some special keyword such as remove to completely remove this lore.

/k tag

Syntax: /k tag <name/remove>
Set your kingdom's tag. This tag is usually a small name (smaller than the kingdom's name) that serves as a cosmetic placeholder %kingdoms_tag% that can be used in different places where a compact name is preferred. Options:

  • <name> Supports color codes and must follow the rules specified in config.yml -> kingdoms-tag There also some special keyword such as remove to completely remove this lore.

/k home

Teleport to your kingdom's home. Moving or getting damaged during the teleportation, will cancel it.
Once you make a new kingdom, the plugin will automatically set your home at where you're standing if the land was automatically claimed successfully.


/k sethome

Syntax: /k sethome [center/centerAxis/centerDirection]
Sets your kingdom home at your location. You need to have SET_HOME kingdom permission to use this command. Your kingdom home is probably already set after you create your kingdom.
Options:

  • [Safe Options]
    • centerDirection Center the player pitch and yaw.
    • centerAxis Centers the player xyz block axis.
    • center Centers both player xyz block axis and player yaw and pitch (direction).

/k unsethome

Removes your kingdom home. You need to have SET_HOME kingdom permission to use this command.


/k nexus

Syntax: /k nexus [open/remove]
Changes your kingdom nexus location. You need to have NEXUS kingdom permission to use this command.
Options:

  • [open/remove]
    • open If you have the permission, you can open your nexus remotely.
    • remove Remove your kingdom's nexus remotely. You may want to check nexus -> allow-removal option in config.

/k vault

Syntax: /k vault [kingdom]
Opens your kingdom's chest directly. Opening others chest requires kingdoms.command.vault.others permission.


/k bank

Syntax: /k bank <deposit/withdraw> <amount> Put or take money from your kingdom. Kingdom banks are used for taxes. You need to have WITHDRAW permission to take money from your kingdom's bank.
Options:

  • <deposit/withdraw> Whether you want to put or take money.
  • <amount> The amount of money to take from or put to your account.

/k resourcepoints

  1. /k resourcepoints converter
    Opens the resource point converter GUI from the nexus remotely.

  1. /k resourcepoints <"deposit" | "withdraw"> <amount>
  • <deposit | withdraw>
    • deposit Convert your money to resource points.
    • withdraw Convert your kingdom's resource points to money.
  • <amount> The amount of resource points.

  1. /k resourcepoints transfer <"kingdom" | "nation"> <amount>
    Transfers resource points from your kingdom/nation to your kingdom/nation. This is not used for transferring resource points to other kingdom/nations. You should use /k donate command for that instead.
  • <"kingdom" | "nation">
    • kingdom Transfer resource points to your kingdom from your nation.
    • nation Transfer resource points to your nation from your kingdom.
  • <amount> The amount of resource points to transfer.

/k sell

Sell a kingdom item with the price specified in the config for resource points.


/k promote

Syntax: /k promote <player> Promote a player in your kingdom to a lower priority rank.
Options:

  • <player> The player to promote.

/k ally/truce/enemy

Syntax: /k ally/truce/enemy <kingdom> Send a request to a kingdom to change your relationship status with them.
Options:

  • <kingdom> The kingdom to request the relation.

/k revoke

Syntax: /k revoke <kingdom> Revoke your relationship with a kingdom.
Options:

  • <kingdom> The kingdom to revoke relations with.

/k demote

Syntax: /k demote <player> Demote a player in your kingdom to a higher priority rank.
Options:

  • <player> The player to demote.

/k gui

Syntax: /k gui <name>
Opens a GUI remotely with its name. Options:

  • <gui> The name of the GUI to open. These names are the full path relative to the guis folder, however since almost all GUIs that can be accessed remotely are nexus GUIs, this command can accept relative names to guis/lang/structures/nexus folder.

Examples:

  • /k gui nexus
  • /k gui champion-upgrades

/k pvp

By default, you can't PvP with your own kingdom members and allies due to relations attributes.
What this command does is only allow you to PvP these players that you normally can't.
If you don't have a kingdom, it'll only have effect when a kingdom set their PvP relation attribute for Naturals to false.

Note

Both players need to have this enabled for it work. That basically means you can PvP anyone that has this enabled.
This does not allow PvP if another plugin prevents it. For example, it does not work if WorldGuard's PvP flag is denied.


/k top

View the top ranking kingdoms with the highest mights.


/k teleport

If you're under attack by another kingdom, use this command to teleport to the champion. Moving or getting damaged during the teleportation, will cancel it.
This will teleport you to where the invasion was started to avoid getting stuck in traps.


/k undo

Undo the last action in your claim history.


/k redo

Redo the last action in your claim history.


/k map

Syntax: /k map [ auto | reset | height] [width]
Show the map for your current location or change its settings. You can also claim lands from the map.
Options:

  • [auto/reset/height]
    • auto When you go from a land to another land, the map will automatically update.
    • reset Reset your map's height and width to the default size.
    • height Set your map's height.
  • [width] Set your map's width.

/k extractor

Syntax: /k extractor [kingdom]
Collects resource points from all extractors in your kingdom. The permission for this command is not given by default. It's mostly intended to be used as a VIP command.

Options:

  • [kingdom] Only for admins that have kingdoms.command.extractor.others permission to collect resource points of all extractors of another kingdom.

/k broadcast <message>

Broadcast a message to all your kingdom members. You need to have BROADCAST kingdom permission to use this. This broadcast will also play a sound to the members.

Options:

  • <message> The message to broadcast. Supports color codes.

/k chat

Syntax: /k chat [message]
Change your current chat channel.
Options:

  • <channel> The channel to switch to. Can be Nation (n), Kingdom (k), Ally (a) and Global (g)
  • [message] Send a message to this channel without switching your main channel.

/k disband

Disbands your kingdom and all the lands and members will be lost. Only the kingdom king can do this.


/k donate

Syntax: /k donate <kingdom> <amount>
Donate resource points to another kingdom. You need to have WITHDRAW kingdom permission to use this.
Options:

  • <kingdom> The kingdom that you want to donate resource points to.
  • <amount> The amount of resource points you want to donate.

/k fly

Toggle kingdoms flight. You need to have FLY kingdom permission to use this. This will also disable fly if you want to toggle fly from other plugins too.

Players will be charged $100 and their kingdom will be charged 100 resource points for players to activate the flight.
Players will also be charged $1 which and their kingdom will be charged that 1 resource points for every second players have flight enabled. Failing to pay this amount will disable their flight.

This will get disabled by the following things:

  • If you get close to someone with fly attribute (by default only enemies if the person in the kingdom didn't change their relation attributes.)
  • If you go to an unclaimed land or a land that the kingdom doesn't allow fly attribute for your relation.
  • If a player damages you even if the first scenario above is not happening.

Things that prevent kingdom flight from being disabled:

  • Getting close to a player without a kingdom.
  • Getting close to a player that has /k sneak on.
  • Getting damaged by natural causes.
  • When in admin mode.
  • When you are in creative or spectator mode.
  • When the nearby enemies are in creative or spectator mode.
  • If you're op or have one of the kingdom flight bypass permissions.
  • Going from your land to a WorldGuard region that allows flying using ExtraWorldGuardFlags plugin.

Your flight will not be disabled instantly by default, you'll be given a few seconds before returning and if you fail to do this or do this but instantly go again, your flight will be disabled.


/k sneak

Normally if you /k fly around a player that you're not friendly with, your flight will get disabled.
Now if that player enables /k sneak, that won't happen again for any nearby players.
It's like the /k pvp version of kingdom flight.


/k language

Syntax: /k language [language]
Sets the language of each individual player. For more information see languages section. Options:

  • [langauge] If it's not specified, the plugin will open a GUI instead.

/k invade

Invade another kingdom's land. You need to have INVADE kingdom permission to use this.


/k ransack

Same as /k invade with the difference that after a successful invasion, the lands are not transferred to the winner, however extra bonuses are gained from invading the kingdom. These include more money and resource points.


/k kick <member>

Kicks a member out of your kingdom. You need to have KICK kingdom permission to use this.
Options:

  • <member> The member in your kingdom that you want to kick.

/k king <member>

Transfers kingdom ownership to another member in your kingdom. This will announce a message to all the online kingdom members by default. There's also an option to announce it to all the online players.
Options:

  • <member> The member in your kingdom that you want to transfer the kingdom's ownership to.

/k show

Syntax: /k show general-selectors Shows detail about a kingdom. These details can be different whether you're an admin, a member of the kingdom, or an outsider.
Options:

  • [#KINGDOM/#PLAYER/kingdom/player]
    • #KINGDOM It's a special parameter used to indicate that the 2nd parameter that's going to be used, is referring to a kingdom name.
    • #PLAYER It's a special parameter used to indicate that the 2nd parameter that's going to be used, is referring to a player name.
    • kingdom/player If the 1st parameter is not one of above, it'll first look for a kingdom named after the 1st parameter, if it couldn't find it, it'll look for a player name.
  • [kingdom/player] Only works if the 1st parameter is #KINGDOM or #PLAYER It'll look for the specific element based on the first parameter.

/k surrender

Surrender during an invasion. If you're invading a kingdom and you surrender, the champion will despawn and the land owner will not change. If you're under attack and surrender, the champion will despawn and the attackers will get the land. You need to have SURRENDER kingdom permission for this to work.


/k tradable

Shows a list of special items that can give you a specific amount of resource points for each item.


/k elections

For more information on what elections are, refer to this section.
Commands below only work when elections are in progress.

/k elections statement

Syntax: /k elections statement
Sign up as a candidate for the election. The statement that you set, will appear in the voting GUI that other members access via /k elections vote command.

/k elections vote

Opens a GUI which allows kingdom members to vote for available candidates. Members can only vote for one person.


/k challenge

Syntax: /k challenge <kingdom>

When challenges are enabled, kingdoms need to send a war declaration warning in advance before being able to /k invade them. The kingdom who wants to challenge another kingdom can choose the amount of preparation time before the other kingdom can be invaded. Each kingdom must challenge the kingdom that they want to invade individually. Once the challenge preparation time has ended, the invader kingdom has 6hrs to invade any of the other kingdom's lands. Once the time is over, they'd have to challenge them again and wait.

Options:

  • <kingdom> The kingdom you want to challenge.

/k visualize

Settings related to land visualizers and indicators. If no argument is specified, this will show the land indicators and the title of the kingdom. If the player has kingdoms.command.visualize.details permission, it'll also show almost every detail associated with this land.


Arguments:

/k visualize toggle

Toggle land indicators when you go from a land to another.

/k visualize permanent

Permanently keep the land indicators. (The titles will stay go away)

/k visualize markers <type>

Set your land indicators markers type. The difference between this and the F3+G Chunk Boundaries is that this option shows the borders in a different way for each relation.
Options:

  • <type> the markers type. These names are customizable in claims.yml config. The players need kingdoms.markers.<type> permission for these to work which are given by default.
    • Default The default markers type. The default markers type is Blocks, however if you use the default option and change the default markers method in claims.yml config, the player will also automatically use the new method.
    • Blocks The fake blocks shown in the corner of chunks.
    • Horizontal Horizontal fake particles that are displayed at the chunk borders.
    • Vertical Vertical fake particles that are displayed at the chunk borders.

/k requestJoin

Syntax: /k requestJoin

Requests the specified kingdom to join their kingdom.

/k joinRequests

Anyone with INVITE permission will be able to open this GUI which shows a list of players who have requested your kingdom to join you. You can deny or accept their request here.

/k inviteCodes

Invite codes are physical produced invitation papers that any player can use to join the kingdom that produced them. You can add, remove and produce papers from this GUI.

/k merge

Syntax: /k merge

Requests the specified kingdom to have your kingdom merged with them. It's important to note that the kingdom that requested the merge first will get merged into the other kingdom and not the other way around. When your kingdom gets merged to another kingdom, all your members, lands, resource points and bank money will be transferred to the other kingdom. Your upgrade levels will be transferred only if they're higher than the other kingdom's upgrade levels.

If there are issues while merging on either side, you'll be warned. These issues are usually related to limits, such as member limit, land limit, etc.


Admins

/k reload

Reloads the plugin completely, including configs, GUIs and language files. Some options will not be updated properly with this command and require a full server restart. Please read here as well.


/k updates

Check for available updates on the Spigot page.


/k admin create

Syntax: /k admin create <'^' | '*' | name> [player]

Options:

  • ^: A super kingdom is a kingdom that when created, claims a square around the player if possible, gives a sum of resource points and bank money, adds all possible turrets and structures to the player's inventory if possible and sets home regardless of whether the land could be claimed or not, but only sets the nexus if the land was claimed. This is only used for testing purposes since it gives you most of the tools you need to test most features.
  • *: Finds the first player (including every player that has ever joined the server until now) that doesn't have a kingdom. This is mostly useful for testing purposes.
  • <name>: Creates a kingdom with the given name.
  • [player] If no player name is given, this creates a kingdom for the admin who executed the command (sets the king of the kingdom).

/k admin claim <kingdom>

Claim a land forcefully for a specific kingdom.
Options:

  • <kingdom> The kingdom to claim the land for.

/k admin kick <player>

Forcefully kick a player out of their kingdom.
Options:

  • <player> The player to kick.

/k admin disband <kingdom>

Disbands a kingdom.
Options:

  • <kingdom> The kingdom to disband.

/k admin join <player> <kingdom>

Forcefully make a player join a specific kingdom.
Options:

  • <player> The player to join the kingdom.
  • <kingdom> The kingdom to make the player join.

/k admin maxLandModifier

Syntax: /k maxLandModifier <kingdom> <amount>
Gives a kingdom extra lands to claim to exceed their default max claims. This amount is not related to or affected by max-claims equation in claims.yml config at all.
Options:

  • <kingdom> The kingdom to give extra lands to.
  • <amount> The amount of extra lands to give to the kingdom.

/k admin nexus <kingdom> [tp]

Open another kingdom's nexus. This uses the kingdom's king instance for a few things. So you might see some things such as taxes differently.
Options:

  • <kingdom> The kingdom to open their nexus.
  • [tp] Teleport to this kingdom's nexus.

/k admin home <kingdom>

Teleport to a kingdom's home.
Options:

  • <kingdom> The kingdom to teleport to their home.

/k admin dailycheck

Performs a manual daily check for taxes, rewards and everything else related to daily checks and restarts the current daily timer.


/k admin rank <player> <rank>

Change a player's rank in a kingdom.
Options:

  • <player> The player to change their kingdom rank.
  • <rank> Their new kingdom rank. It has to be a rank name from their kingdom. Auto tab completion will make this easier.

/k admin resourcepoints <kingdom> [add/set/remove] <amount>

Gives, sets or takes a kingdom's resource points.
Options:

  • <kingdom> The kingdom to modify their resource points.
  • [add/set/remove]
    • add Add x amount of resource points.
    • set Set the kingdom's resource points value to x.
    • remove Remove x amount of resource points.
  • <amount> The amount of resource points to modify.

/k admin bank <kingdom> [add/set/remove] <amount>

Change a kingdom's bank.
Options:

  • <kingdom> The kingdom to modify their bank.
  • [add/set/remove]
    • add Add x amount of money to bank.
    • set Set the kingdom's bank value to x.
    • remove Remove x amount of money from bank.
  • <amount> The amount of money to modify.

/k admin spy

Toggle chat spy. Spies are able to see private channels of other kingdoms (kingdoms, ally and truce chats) and they also see all ranged channels automatically.


/k admin sound

Syntax: /k admin sound <sound> [volume] [pitch]
Test sound names before using them in the config. You can read here about how Minecraft sounds work.
Options:

  • <sound> The sound to play. It has to be one of the names from here.
  • [volume] The volume of the sound.
  • [pitch] The pitch of the sound.

/k admin test

Syntax: /k admin test <message>
Test the unique features of the plugin message system before using it in the config. Note that some of these features will not work for normal chat formatting. This command is special and will format the message in a way to make some special features such as the line breaks to work.
Options:

  • <message> The message to display. Supports line breaks, complex messages, hex color codes and etc...

/k admin hologram

Syntax: /k admin hologram <radius>

Note

This command is useless as of v1.15.3 since the holograms are "fake". Even if you get duplicated holograms, it can be fixed with a simple relog or in worst case it's a simple bug that needs to be fixed. This command will not work on fake holograms.

Remove bugged structure and turret holograms for any reason (such as force stops and server crashes) in a given radius. This won't affect normal armor stands or holograms that are not markers (you don't really need to understand what a marker hologram is, but it might remove non-kingdoms related holograms by other plugins when used near them.)
Options:

  • <radius> The block radius to delete the holograms.

/k admin unclaim

Forcefully unclaim a land.


/k admin toggle

Toggles admin mode.


/k admin evaluate

Syntax: /k admin evaluate <expression>
Evaluates an expression using the math compiler. You can read about how the math engine works here. The math compiler has a robust hint system already, but this command will give even more detailed hints for what you're trying to do. It'll also provide a temporary environment so you can test your equations before deploying them on your server's config. It also has a really advanced tab completion system that works with different math components. Options:

  • <expression> The expression to evaluate.

/k admin dynmap <fullrender/remove>

Performs different async actions regarding to Dynmap.
Options:

  • <fullrender> Perform a manual render for the whole map.
  • <remove> Remove the markers, icons and everything else related to Kingdoms from the map.

/k admin masswar <start/end>

Manage masswar event.
Options:

  • <start/end>
    • start Starts the masswar event if it's not running already.
    • end Ends the masswar event if it's running.

/k admin shield <kingdom> [add/set/remove] <time>

Changes a kingdom's shield duration.
Options:

  • <kingdom> The kingdom to modify their shield.
  • [add/set/remove]
    • add Add x amount of time to shield.
    • set Set the kingdom's shield duration to x.
    • remove Remove x amount of shield from the kingdom.
  • <time> The shield duration time for the kingdom. This supports time suffixes and uses hours by default.

/k admin player [player] [fd]

Show all the possible kingdom related information about a player.
Options:

  • [player] The player to show information about or the command sender if not the console.
  • [fd] Meaning find duplicate searches all the kingdoms (this might take a few seconds depending on how many kingdoms your server has) to look if the player data can be found in multiple kingdoms. This is used for debugging critical issues which should not happen.

/k admin land [world] <x> <z>

Teleports you to a specific land with the specified chunk coordinates (not location coordinates). Please make sure to teleport using creative game mode with your fly enabled. The land you're going to teleport to might be unloaded, and you might fall into the void if your connection is slow.
The x z axis of the teleportation location is the center of the chunk and the y axis of this location is always the highest block found in the center of the chunk.
Options:

  • [world] The world that this land belongs to.
  • <x> The x axis of the chunk location.
  • <z> The z axis of the chunk location.

You can also find the server's chunk location in the Debug Screen by pressing F3 in-game. See this screenshot.
Also, check /k visualize command for getting a land's information.


/k admin command

The /k help command has something similar, but designed for players specifically. Syntax: /k admin command <command>
Used to display all available information for a kingdom command. Such as it's main name, parent, aliases, permission and etc.
This command also allows you to copy the permission name. Options:

  • <command> The command name without slash or /k. Command parents are also separated by spaces, but no argument should be passed to them. This parameter support the command aliases.

Examples:

  • /k admin command show
  • /k admin command admin command
  • /k admin command admin nation disband

/k admin item resourcepoints

Syntax: /k admin item resourceponts <item> [amount]
Gives you a custom item that is worth a custom amount. Options:

  • <item> The item name defined in resource-points.yml
  • [amount] The amount of the item given or 1 by default.

Example: /k admin item rp crystal


/k admin item inject

Syntax: /k admin item inject <amount>
Injects an amount of resource points the item you're holding is worth into the item. You can convert this item back to resource points of the specified amount from the resource points converter. Note that the injected amount is for per item. This injected amount will persist even if the plugin disabled, although you can't do anything with it. Options:

  • <amount> The amount of resource points to inject into this item.

Example: /k admin item inject 3000


/k admin item

Syntax: /k admin item <"turret" | "structure"> <style> [amount]
Gives you the kingdom item with the specified name and amount. Options:

  • <"turret" | "structure"> Whether the item is going to be a turret or a structure (without the quotes.)
  • <style> The style name of this kingdom item which is the same name of the config file for turrets in Turrets folder and the structure section name of structures in structures.yml
  • [amount] The amount of the item given or 1 by default.

Examples:

  • /k admin item turret arrow
  • /k admin item turret heatbeam 3
  • /k admin item structure powercell

/k admin item editor

Opens an advanced GUI editor for items. This command is mostly meant to be used in addition to /k admin gui for creating GUIs, but it can also be used as a general item editor. It will edit the item in your current hand or make a template item if you're not holding anything. It can support a variety of item properties including the name, lore, custom model data, attributes, material and NBT.


/k admin gui

This command enables GUI mode. When the GUI mode is enabled, opening any kind container (chests, dispenser, hoppers, etc) will parse that container as a GUI config. The parsed GUI will be saved as plugins/Kingdoms/parsed-gui-<num>.yml. This command also uses smart analysis for stacked items or items that are meant to be decorative for a better human friendly configuration file, however it's only a great config as a start, you'll still have to change their name and lore yourself later on in the config. You can use this command with /k admin item editor for more advanced in-game editing.


/k admin pacifism

Syntax: /k admin pacifism <kingdom>
Toggles pacifism mode for a certain kingdom. Options:

  • <kingdom> The kingdom name to enable pacifism for.

/k admin permanent

Syntax: /k admin permanent <kingdom>
Enables permanent mode for a kingdom. Permanent mode is a mode that can only be changed using this command. Permanent kingdoms are excluded from paying taxes and inactivity disbands. They're mainly used for servers that have predefined admin kingdoms without letting players create kingdoms themselves. Options:

  • <kingdom> The kingdom name to enable permanent mode for.

/k admin track

This very special command tells you the path of certain language entries when the messages are sent to you and path of GUI configs when you open one.
For example, to know where the extractor GUI config is, you have to enable this command and find an extractor to open its GUI or if you want to know where /k help command messages are coming from just run the /k help command while language tracking is enabled.


/k admin purge

This deletes all kingdoms data (without affecting configs). It'll kick all players and whitelist the server. You'll have to restart the server after the purging is done.


/k admin languagepacks

Install, uninstall or update a language pack. For more information check the languages section. When there are updates available, the language options will display a summary, you can also middle-click them to see a complete list of updated files in a format of tree command structure.

If you're having internet connection issues with installing language packs, check this FAQ


/k admin addons

Install, uninstall or update an addon.


/k admin migrate database

Will change the database type of the plugin safely. It will not touch the existing data inside data folder unless necessary, however it will create a backup inside Kingdoms folder if migrating from a JSON/YAML database and delete the database folders because of file extension conflicts. This command will not do anything to unrelated data such as Chunk Snapshots that have their own data formats.


/k admin FSCK

Syntax: /k admin FSCK ["chunkOperations" | "fix"]

  • chunkOperations: When used, chunk operations are performed. What chunk operation means is anything that requires loading the chunks. This includes checking if the block for turrets/structures or signs for protected blocks are present. Since these operations load chunks, they consume a lot of CPU and RAM. However, it's completely asynchronous if you're using Paper.
  • fix: By default this command doesn't change any data. It just reports you what needs to be changed. By using this argument the plugin will actually try and change/remove data.

Please read Data Corruption section of troubleshooting wiki. The name of this command originated from Linux's fsck which stands for file system consistency check, and Windows' CHKDSK which stands for check disk. They are also magical commands that fix your hard drive issues. While it cannot fix all your issues, it certainly can fix a lot of them.

Note

Note that the argument can be mixed: /k admin FSCK chunkOperations fix

Warning

You should definitely take a backup from kingdom data files, specially if you're using a world management plugin such as Multiverse as they don't load worlds properly sometimes and it can lead to the plugin deleting lands that are not corrupted. Although you're safe if you don't use the fix argument, once that argument is used, it'll change or remove things that were not reported before in very rare cases.

This command first loads all your data. Including all nation, kingdom, land, player, mails, etc data and then performs checkup operations on them. For this reason, it's definitely recommended to restart the server after the operation is finished to prevent memory hog. This is only an issue with huge servers, small servers won't be affected. However this also makes subsequent execution of the command perform faster.

Some addons may add their own checks to fix possible issues with their own data. If you're a developer and want to do this, check Addons API page.

Note

If the server got stuck performing certain operations (in which you'll receive a console warning) and there has been no update messages regarding any operations finishing, you should stop the server normally with /stop these are usually harmless issues. Also, in rare cases, it's recommended to do the command multiple times until all issues are fixed, since fixing some issues can cause other issues (which is normal), but can be fixed by repeating the command.

Based on the situation, this command may take these actions if necessary:

  • Disband a kingdom or nation.
  • Unclaim a land.
  • Kick a player out of their kingdom.
  • Remove turrets, structures and protection signs.
  • Change the king/capital of a kingdom/nation as a result of the previous actions.
  • Duplicated kings, unknown ranks, rank priority issues. Changing ranks.
  • Remove relationships.
  • Removes disabled kingdom upgrades and increases upgrade levels that are lower than the default.

API wise, this command will not call any event for changing data.


/k admin forEach

Syntax: /k admin forEach contextType=<"playersInKingdom" | "kingdomsInNation"> context=< kingdom name | nation name> command=<command> [condition=condition]

  • contextType:
    • playersInKingdom: Executes the command against each player inside the given kingdom.
    • kingdomsInNation: Executes the command against each kingdom inside a nation.
  • context: If contextType is playersInKingdom, this must be the kingdom name or if it's kingdomsInNation it must be a nation name which both can be fetched using %kingdoms_kingdom_name% and %kingdoms_nation_name% placeholders.
  • command: The command to be executed. The command here must begin with "CONSOLE:" prefix.
  • condition: Optional condition to check for each entry and execute the command only if the condition is met for each entry.

Examples:

  • Give kingdoms.permission permission to all players in a kingdom: "/k admin forEach contextType=playersInKingdom context=%kingdoms_kingdom_name% command="CONSOLE:lp user %player% permission unset kingdoms.permission"
  • Give 10 resource points to all kingdoms in a nation if the kingdom has more than 10 members: "/k admin forEach contextType=kingdomsInNation context=%kingdoms_nation_name% command="CONSOLE:k admin rp %kingdoms_kingdom_name% add 10" condition="kingdoms_members > 10"

Note

In the examples above, the context used is a placeholder, which only works if a player executed the command, but wouldn't work if console did since the placeholder refers to the person who sent the command, you could just use a kingdom/nation name instead in console.

⚠️ **GitHub.com Fallback** ⚠️