FAQ - CryptoMorin/KingdomsX GitHub Wiki

Table of Contents


(Why) Can I get the plugin for free?

Please refer to this section.

Support for 1.8 and lower versions

Please DO NOT ask me to support 1.8 ever. This version is extremely outdated, it's click here old.
Almost 40% of the plugin features will stop working on this version and it's incredibly hard to maintain.
The only reason 1.9 and versions above are supported is because they're just easier to maintain. I always recommend using the latest Spigot version. The plugin doesn't guarantee that the old versions will always be supported.

If your reason for not using 1.9+ is the PvP mechanics, use OldCombatMechanics.
Another excuse I usually get is that, "1.8 is more stable". 1.12 is better than 1.8-1.11 in both performance and stability aspects. The only reason it uses a little more resource is because of the newly added features which is completely normal. This little increase in resource usage is extremely insignificant compared to versions above 1.12

Supported server versions by the plugin

The plugin is compatible with Minecraft 1.9+ versions, up to the latest version that is mentioned on the Spigot page, but only for the latest server version of that minor update.

The latest Kingdoms version supports the following Minecraft versions: 1.20.4, 1.20.2, 1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5, 1.14.4, 1.13.2, 1.12.2, 1.11.2, 1.10.2 and 1.9.4. Support is only provided for the latest plugin version, we can't continue to provide support for outdated versions.

Note

Some plugin features might only work on the latest released Minecraft version. Refer to the System Requirements section for more plugin installation information.

Source Code

The plugin is partly open sourced already. No, I will not give you the source code even if you offer me a million dollars, the answer is going to be no. For literally any other reasons, or offers the answer will be no. If you have any suggestions or would like to report a bug, you can do what everyone else does and report it.

Now that's out of the way, I'm planning to make the plugin open source, but there is no ETA. For more information, you can also check this post in the Discord. I cannot disclose any information about why I don't want to publish the full source code right now. It's no big deal secret, but I just don't want to argue with people about my reasoning on this specific subject that I've argued a lot about before.

And lastly I'm sorry that this specific section of the FAQ sounds harsh. I just wanted to make it clear and concise. If you were linked to this FAQ entry, please don't take it personally. A lot of people asked for the source code before, and that's totally fine, my answer was no, but if you want to argue with me about it, that's what makes me mad >:c

How do I change the language?

Kingdoms supports a variety of translations that are entirely made by the community and can be viewed here. However, the plugin doesn't come with any of those languages pre-installed (except English which is the default), meaning that you have to manually install them. To do so, simply use the /k admin languagepacks command and download your language pack. Please refer to this section for more information regarding languages.

Since the plugin is international by default, if it detects a player's client language that's also installed on the server, it will automatically show messages in that language. Otherwise, it will fall back to the language specified under the lang option in config.yml. Players can also manually set their language (out of the installed ones) with the /k language command.

Additionally, you can also force the same language for all users. Please refer to this FAQ section for more information regarding that.

Why players can't pickup turret and structure items?

They're probably in creative mode. Players cannot do that because they'll be able to duplicate the item in creative and use it everywhere. If you like an admin to bypass this, give them kingdoms.creative.pickup permission.

Why aren't my turrets shooting?

Make sure:

  • It takes up to 1 minute after the server is fully loaded for turrets to load.
  • Your turrets have enough ammo. You can buy ammo for your turret by right-clicking them and pressing the ammo button.
  • Your kingdom isn't friendly with the kingdom that the turret belongs to (more specifically, it shouldn't have a TURRET_CEASEFIRE attribute with your kingdom) Or the opposite for friendly turrets such as healing turrets.
  • Turrets aren't disabled in that chunk by a Regulator structure.
  • You're not vanished, in God mode, creative mode, opped, in admin mode, invulnerable, etc. (Yes, even healing turrets are affected by them)
  • If your kingdom is pacifist, turrets placed in your kingdom will not shoot any players.
  • Turrets don't shoot pacifist players.
  • Some turrets such as healing, psionic and soldier only target players.
  • Turrets generally do not target animals, water mobs and NPCs.
  • Plugins that disable other plugins per world of world management plugins are known to cause issues for turrets. Multiverse should work fine, but if you're experiencing these issues, you should first remove these plugins and test turrets without them to confirm.
  • If they all look fine, do /k admin debug toggle to enable debug mode. Then look at the turret that isn't working with your mouse and do /k admin debug turret. You'll now begin to see messages which you can send to the developers to diagnose the issue.

Regulator structures don't refill turret ammo automatically

In order for a turret to be refilled, there are a few conditions:

  • If turrets reached 0 ammo.
  • Turrets must be in the same land as the regulator structure.
  • The kingdom can afford the full price (resource points) for the max ammo.

Extractors aren't producing any resource points

Check if they have enough fuel.

Ranged Global Channel

If you want /k c g global channel to be /k c r by default, you can easily do that by copying ranged channel configuration into the global one.
The ranged channel uses a special recipient condition. Global channel doesn't have any condition, anyone can see (be a recipient of) this channel. You can simply copy this condition to the global config, so it'd look something like:

  global: # this is the channel's ID
    recipients-condition: "kingdoms_is_spy || (0 <= distance <= 50)"
    color: '&f'

    # The rest of the config...

As you can see above, by default, the range is 50 blocks, you can change that number.

You might also want to delete /k c r entirely now. You can do that by deleting this entire section.

Finally you should /k reload to apply the changes.

Essentials/CMI Nickname in chat

In order to make Essentials or CMI custom nicknames work for kingdoms chat you'd have to:

  • In Essentials' config.yml make sure that both change-displayname and add-prefix-suffix options are enabled. Restart the server or do /ess reload
  • Replace all %displayname% with %pure-displayname% in Kingdoms' chat.yml

Duplicated Chat

This either means that you have another chat plugin installed, you're getting an error in your console, or you misconfigured something in your chat.yml config. Kingdoms already comes with a very advanced chat system. You have to decide whether you want continue using Kingdoms chat system or use another plugin.

If you want to continue using Kingdoms chat system, simply delete your other chat plugin, e.g. EssentialsChat, HeroChat, etc. If you're using CMI you have to disable the chat functionality from their config:

  • In CMI's config.yml search for ModifyChatFormat option and set it to false.
  • If you're still getting duplicated chat after doing that, change Kingdoms' chat priority to priority: NORMAL

If you want to use another chat plugin other than kingdom's built-in system, you have to go to chat.yml -> global-channel -> format -> false
Another thing you can do is to parse kingdom chat formats as placeholders to use in other chat plugins (if they support the use of normal chat channel AsyncPlayerChatEvent) by going to chat.yml -> parse-as-placeholder -> true
Most people use another plugin because the support hovering on messages. Kingdoms also support that too among many other chat features if you want to use it.

If you've decided to use another chat plugin, you might also want to play around with the priority option if your chat messages are still duplicated when using private kingdom chats. Usually setting this option to LOW helps.

Why is in-game chat not sent to Discord

Kingdoms will automatically send messages to DiscordSRV since the default chat handler cannot handle complex features such as hover messages and it hides private kingdom chats.

Important

For some unknown reasons, this feature doesn't work for some people. We still don't know why.
Before anything, please make sure you didn't change anything in chat.yml and you're not getting any errors in your console.

If you're getting the error The channel ... cannot be used because it's not specified in DiscordSRV ... that means the channel that you're using in one of these config options is not specified in DiscordSRV's 'channels' option. Most likely you already added the $main channel (which is the default chat channel used to send global messages), but not the $console channel which is the default console channel of course. This is needed, because in order to send webhook-enabled messages (if that option is enabled) the channel needs to be specified there to work.
To add this you simply copy your console channel's ID and change the Channels option to below:

Channels: {"global": "...", "console": "Console Channel ID"}

Then restart the server.

If you're not getting any errors at all or still not getting global messages after fixing the error, there are many ways to fix this, each have their own disadvantages.
The easiest is to disable Kingdoms handling the global chat. You cannot use advanced chat features like hover messages if you disable this. Another way is to make Kingdoms ignore DiscordSRV and set cancel option to false, this will keep complex chat features but DiscordSRV will keep sending private kingdoms chat.

When breaking the block underneath turrets, they still work.

This is not a bug. The block is not required for the turret to continue working. It's just a practice to encourage players to put their turrets on specific blocks. You cannot force the turrets to stop working after the block is broken, because it can lead to server lag when used excessively. This is a planned feature for future updates.

Cannot translate placeholders for null player

Related errors: /k disband and clicking on a turret
This is a 1.15/1.16 Spigot bug and I can't fix it, Spigot is supposed to do it which they already did. This happens to any GUI that has a hopper (and a few other special types) inventory. You'll have to update your server either by running BuildTools (Spigot) or getting a direct download from Paper. Please avoid any other websites (even your host's provided Jars) or forks. They're mostly outdated as well and won't fix the issue.

Players are getting kicked because of turrets

Only Inferno turrets can cause this. Unfortunately, due to these turrets using a beam, BungeeCord networks can't handle this, so this only happens if you're using BungeeCord. To fix this, simply go to the inferno turret's config and change the turret mechanic type to something else. You can delete the turret entirely, however if you do, all the placed inferno turrets will be bugged.
This issue currently has no proper fix yet as it's something between a BungeeCord bug and an advanced code that isn't used directly from the Spigot API.

Bank services are currently unavailable

This means you either don't have Vault or an economy plugin installed.
You can use any plugin if it supports Vault. Plugins like EssentialsX, CMI (CMI provides their own Vault version), XConomy support Vault.

If you have another economy plugin installed with Essentials, it should usually take priority and enable, but if that didn't happen and your server is still using Vault as your economy plugin (this can happen in a plugin such as Ultra Economy), you'll have to look for an option in the other economy plugin to fix that as there is no option to change the economy plugin in Essentials or Vault.

What links can I use for Dynmap flag?

You need to use a link that points directly to an image file. This can be a png, jpg and etc. By a direct link, it means that when you open the link in your browser, it must only open an image and nothing else. Almost 90% of them end with the image's file extension. Here are some examples:
Direct Links

Invalid

Also, the link must not come from a blacklisted domain. Typically popular porn websites by default, but it's pretty easy to bypass this.

Changing relation attributes has no effects

If you've changed the default relation attributes in relations.yml, the previously created kingdoms will not inherit the new settings by default. They'll keep their old settings. To prevent this, you could disable custom-attributes option in relations.yml config, and maybe even remove the relation attributes from nexus settings GUI entirely.

If you've changed the settings for your own kingdom in nexus settings, it'll only take effect once both kingdoms have the same attribute enabled for the same relation. You can change this by disabling agreements option in relations.yml, but it's definitely not recommended. For example, if kingdom A has ceasefire attribute enabled, but kingdom B doesn't have that enabled, then both kingdom A and B will be able to fight each other, however this is not the case when you change the agreements option.

I'm getting warnings about missing config options on server startup?

This is nothing to worry about, as those warnings just inform you that there have been new config additions in the Kingdoms version you're currently using.
Config files don't get updated automatically with new features due to loss of comments above options. The reason for this is because the way Bukkit handles the configuration, doesn't allow for comments.
Kingdoms will always use the default values for these missing options, but if you want to get access and control over them, you need to update your files.

The easiest and most convenient way is always deleting the file and letting Kingdoms regenerate it, containing the new features. This, however, becomes an issue if you made changes to the file and don't want to lose them. In this case only a manual update is a viable solution.

Kingdoms default configuration files are kept up to date with latest changes and can be found here. You can either update your files using GitHub's commit history or by using a tool such as Diffchecker and comparing your files with the default ones. Simply add the missing values under correct sections and configure them to your preferences.

Tip

As of Kingdoms v1.13.2, the plugin features an automatic config updater! Please refer here for more info.

How can I change max claims a kingdom can have?

This can be done by going to claims.yml and modifying the max-claims option. By default it uses an equation and is set to scale depending on various factors, such as kingdom's members. You can use kingdom and nation placeholders here, as well as math operations and functions.

Here's a quick rundown of how the calculation is done, using a kingdom with two players in it and the default equation as an example:

max-claims:
  # Worlds can have different limits, "default" is used for any world name that is not specified here.
  default: "((kingdoms_members + kingdoms_nation_kingdoms) * 5) + kingdoms_max_lands_modifier + max_claims"
  • kingdoms_members = 2, in this example, we only have two members in the kingdom.
  • kingdoms_nation_kingdoms = 0, as we're not in a nation. If we were in one, it'd be the amount of kingdoms in the nation (not the total amount of players in the nation.)
  • kingdoms_max_land_modifier = 0, as we don't have any extra lands given by admins from the /k admin maxLandModifier command.
  • max_claims = 0. This is a special placeholder for the max-claims misc upgrade which can be found in misc-upgrades.yml. Since we didn't purchase any additional lands in Nexus -> Misc Upgrades -> Max Claims, it's 0. Another simpler way to increase max claims would be to change the scaling for this upgrade as it uses a simpler equation.

In conclusion, our claiming limit would be: ((2 + 0) * 5) + 0 + 0 = 2 * 5 = 10.

Where can I change the items and prices in the Outpost structure?

Go to guis -> <lang> -> structures -> outpost. Here you'll find files named 1.yml and 2.yml, which simply represent different pages of the Outpost menu. If you, for example, open the first file, you'll find some predefined items, along with their prices and other standard GUI options.
If you want to keep the default items and just modify their prices, simply change the cost option for each of them (remember to update the lore to display your newly changed price!). You can also edit the item being sold under a special section called item which follows the XItemStack formatting rules.

Items being sold here must have the item key beginning with the sell- prefix, otherwise it will not work. Remove or modify the existing items and configure your own and you're set to go.

How to disable a command?

All the commands can be disabled and managed in config.yml -> commands.
You can disable a command by simply adding it to the list with the disabled: true option added to it.
The commands specified here must be the command's main node name, and not the translated ones (which you can see using /k admin command command). They're usually shown on /k help without the /k part in front (eg. /k nexus is just nexus).

Let's say you want to disable the /k fly command. Simply go to the commands section, and disable it with the following format:

  fly:
    disabled: true

This particular example is added to the config by default here.
It's important to have the correct spacing before the command name and the disabled: true part, just like when you're editing any other .yml file. When you're done, don't forget to reload the plugin using /k reload.
This will cause doing /k fly to show the default unknown command error message, as if it never existed.

This also works with grouping commands, meaning that you can disable /k nation or /k admin and all of its sub-commands just by disabling the parent (main) command.

On a sidenote, if you're getting a message similar to [KingdomsX] Unknown command for /k help order: fly after disabling a command, that means that the plugin is trying to display a command on /k help which is disabled. Simply scroll down to the help -> order section, just under the current commands section and remove it from the list.

Disabling sub-commands

Some commands, like /k rp for example, have their own sub-commands (/k rp deposit, /k rp withdraw, etc). To disable such commands, the format is a bit different than the previously mentioned one.
In the following example, we're going to be disabling the /k rp deposit command:

  resourcepoints:      # <-- main command
    commands:          # <-- note this part
      deposit:         # <-- sub-command you're disabling
        disabled: true

You can see this example in the default config.

How do I set SafeZone/WarZone?

SafeZones and WarZones are an old Factions concept that provide basic protection for regions around the map.

  • SafeZone: Players cannot PvP or build in these regions. Usually the spawn it self.
  • WarZone: Players can PvP, but can't build in these regions. Usually set around the spawn. (Some plugins also had the option to enable PvP even between friendly players in these zones, but it was rarely used)

Nowadays these features are replaced by a much more advanced and specialized plugin called WorldGuard (which also requires WorldEdit) and therefore there is no reason for Kingdoms to support such features. However kingdoms does support this plugin. It prevents players from claiming in WorldGuard regions entirely.

If you want the basic SafeZone/WarZone system you can do that with a feature called template regions and inheritance.

# Two template regions without any physical size. They're just abstract regions.
/rg define -g safezone
/rg define -g warzone

# we don't want to redefine common flags.
/rg setparent warzone safezone

/rg flag safezone pvp deny
/rg flag safezone build deny
/rg flag safezone kingdoms-claimable deny # Don't allow claiming in these zones.
/rg flag warzone pvp allow   # override flag
# You may want to add more flags, but add it to the safezone.

Now using WorldEdit's //wand command select an area. Almost in all cases, you'd want to protect all blocks from underground up to sky when selecting WorldGuard regions. Instead of actually finding the corners of both ends manually which is almost impossible, you can use //exapnd vert command to expand your current selection from the lowest y in the world to the highest y. After completing your selection, you can make a new region with /rg create <name> and /rg setparent <name> warzone|safezone to make that region inherit flags from our defined region templates.
Check the quick start for more information.

MythicMobs Champions

To use MythicMobs plugin as the champion, you can go to champion-upgrades.yml config. Under each champion there's an option called base, under that option, you can add an option named mythicmob with the MythicMob's name as the value (you can get a list of your MythicMob names with /mm mobs list command.)

For example, it should look something like

champions:
  zombie:
    name: 'Equipment'
    cost: "(lvl + 1) * 100"
    max-level: 5
    base:
      mythicmob: SkeletonKing # <---------------------
      #type: ZOMBIE this should be managed by MythicMobs
      baby: false
      name: "&c%kingdoms_name% &6Champion"
    levels: ~

All other upgrades will work correctly as long as the MythicMob settings don't conflict with them. The usual equipment champion upgrade (that is used to upgrade the champion's armor and weapon) will be replaced with the MythicMob level. The level of equipment upgrade is the MythicMob level. You can use different settings for different MythicMob levels to make the champion stronger.

How do I disable Nations?

Generally speaking, nations are the useful if your server has a lot of active players and/or kingdoms. Since they allow two or more kingdoms to be "grouped" into a nation, that can make the game boring on low player counts.
The general logic in those situations is that you want more smaller kingdoms, rather than a few big ones, as that would result in most action between players. There are also many advantages to joining a nation.

The easiest way to disable nations is to disable the main /k nation command. That way players won't be able to use any nation commands, and will never be able to create, join or use nations.
Find this section in the config.yml and set disabled to true This FAQ is a specific version of How to disable a command.

How do I disable turrets/structures?

On rare occasions, some people want to use Kingdoms for its mechanics without turrets or other structures.

To disable them, go to turrets.yml and set enabled: false. Now that the turret functionalities are disabled, you still need to remove them from the Nexus GUI, so that people can't pointlessly buy them.
Go to guis -> <lang> -> structures -> nexus -> nexus.yml and remove the whole turrets section or for structures, the structures section. By doing so, you are actually removing the button that opens the menu for buying turrets, so that there's no way for players to obtain them.

Note

Any already placed turrets will still remain placed and interactable even after disabling them. They just won't be able to shoot. The nexus structure cannot be disabled as it's one of the main parts of the game.

File contents are being reset when I save changes

This issue mostly affects only Linux environments and should work properly on Windows.
Automatic file reloads are generally unreliable on Linux machines due to how Java implemented it. While this can't be fixed, it can be disabled if you're experiencing abnormal behaviors.
The behavior is mainly affected by your text editor. It can range from double reloads, no reloads or even infinite reloads.
For example, Vim and Sublime are known to cause duplicate saves, but the plugin tries to ignore these duplicates.

To disable automatic file reloads, open your config.yml, find the automatic-config-reloads option and set it to false.

Note

A server restart is required in order to make the option work.

I disabled mob spawning in the Regulator but mobs still spawn?

This is a common misunderstanding and is related to the way how Regulators work.

Regulators do not give a kingdom-wide effect and instead they only affect the current land they're placed in. What this basically means is that if you disable mob spawning in a Regulator, it's only disabled for that claim (chunk) where the Regulator is located. Mobs can still spawn in surrounding lands and come to the Regulator land. Disabling mob spawning in multiple lands is only possible if you place a Regulator in every of those lands and disable it for each.

Regulators that provide a bigger area of effect (affect multiple lands) is a planned feature for some future update.

I removed some Turrets/Structures using WorldEdit but the hologram stayed?

Removing any Kingdoms structures or turrets using WorldEdit is not recommended as it doesn't actually remove their data - even though they get physically removed from the map. Kingdoms, however, has an automatic system on server startup that fixes such data inconsistencies, but what it can't fix is the leftover holograms.

You need to remove those manually by standing near a hologram and using the command /k admin hologram <radius>, for example: /k admin hologram 5. This will remove any holograms in a 5-block radius from your location.

For more information about safe uninstallation, visit this section.

What are these weird symbols?

You might notice some weird looking symbols such as {$p} or {$s} or stuff similar to that. These are called macros and they are basically custom variables defined to be used in kingdoms plugin.

{$p} and {$s} specifically are color scheme macros which are defined by default in config.yml.
Why not just use &2 and &6 color codes? They're certainly easier to use, but imagine you want to change your entire color scheme. Find&Replace is your best option, but certain colors are not meant to be replaced by another color and you still have to replace them in the GUI files and other configs. By using macros you're namespacing your color scheme which you can change any time reliably without worrying about what you're replacing.

That's just one advantage of using macros. Another advantage is simply you don't have to repeat the same thing over and over again in configs.

Read the relevant section for more info.

IllegalStateException: zip file closed

If you get this error that means the JAR file you've downloaded is corrupted. You simply need to redownload the JAR file in order for it to work. If redownloading doesn't help, it's likely that your browser or another software is preventing the file from being downloaded correctly.

This rarely happens when you download JAR file, specially when your download is interrupted (for example by losing connection temporarily) and it has a higher risk when the file size is bigger. This could also happen if you try to run or open the plugin's JAR file itself using a ZIP program.

How to disable resource points withdraw/deposit

First you need to disable /k resourcepoints withdraw/deposit commands (refer to this section on how to disable commands). Essentially, go to config.yml and under the commands section add:

  resourcepoints:
    commands:
      withdraw:
        disabled: true
      deposit:
        disabled: true

Secondly, we also need to remove it from the resource points converter GUI. Go to the GUI config and delete that text (note don't remove the info option between the two options) and that should remove it from the GUI.

Why are kingdom guards not spawning?

Make sure:

  • You're not opped, in admin mode, god mode, vanished, invulnerable, etc.
  • You're not using invisibility potion (unless wearing armor.)
  • The player doesn't have any guards following it. (They might not see it due to being too far away, but that still counts.)
  • Kingdoms is not disabled in that world (which is unlikely.)
  • The land that the player is entering is claimed and belongs to an enemy kingdom. Meaning the player doesn't have turret ceasefire or ceasefire relation attributes with.
  • The land that the player is entering doesn't belong to a pacifist kingdom.
  • The player isn't in a pacifist kingdom.
  • The player must walk between the chunks to trigger guard spawning. (For example, going from wilderness to the land of that kingdom.)
  • The kingdom that the land belongs to, upgraded both nexus guards and normal guards (and those upgrades should be enabled in both kingdom misc upgrade settings and the config.)
  • If the player is getting a message similar to "kingdom guards are spawning around you...", but you don't see any mobs, that means it's a plugin conflict.
  • There are no errors in the console (including warning messages from the plugin regarding guards.)

Network issues with language packs & addons

Your internet connection might be restricted for where your server is located. Very few countries block www.github.com (this website where you're reading this right now), such as China's Great Wall. You might want to use a "legal VPN" for your server or just switch server locations entirely to solve this issue, but that's not always possible. There are also other issues such as being on a shared hosting and if by pure chance you end up in a node that multiple people use Kingdoms plugin, and they're all downloading language packs too, in which case your server's IP will be blocked by GitHub for a short period of time. There's a manual process which you can install language packs & addons, but you'd still need to have access to www.github.com in order to download the files!

Addons

Download the addon you want from here and put it in your plugins folder like a normal plugin, and restart the server.

Language Packs

This ones a little harder. First make sure that your server is offline. You need to do all this while your server isn't running.
Go to languages repository and select the language you want to install. Those words might be confusing, you have to know your country's ISO 639-1 code. For example, China's code is zh. So we're going to be downloading that one. Click on it and it'll show you some other files. You need to download these files. Now, GitHub unfortunately doesn't have an official way to download certain folders only, so we're going to have to use a third-party website such as download-directory.github.io. In the box, paste the link of your preferred language. Since we clicked Chinese (zh), the link would look something like https://github.com/CryptoMorin/KingdomsX/tree/master/resources/languages/zh. After pasting the link in the box, click Enter on your keyboard. It'll now start getting the folders for you. After a few seconds it should prompt you to download a zip file. Accept the download.

Unzip the files in plugins/Kingdoms/repository/languages/zh folder (create the folders if they don't exist).
Next we need to edit a special file called globals.yml (again, create the file if it doesn't exist). And depending on if the file exists or not, we need to add this option to it:

languages:
  zh: master

Multiple languages would look like:

languages:
  zh: master
  de: master
  pl: master
  ...

If there are other options present in the file, do not remove them. They're not that important, but it'll reset some cached data such as when to perform taxes, mass wars, etc. All those timers will reset if you delete them.

That's it! Start the server and make sure there are no errors in the console (except the internet connection ones.) Now you should be able to see your installed languages in /k lang GUI.
You can repeat the same process for other languages. You could also download the whole languages folder if you want to add them all.

Forcing the same language for all users

By default, the plugin is international. What that means is that it automatically checks for player's client language and if it's supported, it will automatically display all Kingdoms messages in that language for them. If their language isn't supported, the plugin will automatically use the default plugin language set under the lang option in config.yml.

Some people may want to change this behavior and automatically force the same language for all new players, despite their client language settings. To do so, go to config.yml, find the option force-lang and set it to true. This way, all Kingdoms messages will be shown using the language file specified in the lang option for all players.

Note

The forced language will only be applied to new players that first join the server after you've changed this option. Existing players will keep their previous language option and will have to manually change their language using /k language.

How do I disable pacifism?

There are two steps to do in order to disable the ability for kingdoms to become pacifist.

First, we want to disable the GUI prompt asking the player whether they want to be a pacifist or aggressor kingdom when creating a new kingdom. Go to config.yml -> creation -> kingdoms -> show-kingdom-type-gui and set it to false.

Secondly, we want to prevent players from switching to pacifist mode in their Nexus Settings. To do so, we're simply going to remove the pacifism button from the Nexus Settings GUI located in guis -> <lang> -> structures -> nexus -> settings -> settings.yml, as highlighted here.

Important

Kingdoms that have already chosen to be pacifist will still keep their pacifism state even after you've done the things mentioned above. Only newly created kingdoms won't get the option to enable pacifism. To force disable pacifism for existing kingdoms, you can use the /k admin pacifism command.

Note

If you'd like to only prevent normal players from changing the pacifism state, do not disable pacifism entirely, but disable the GUI options mentioned above. After that, admins can manually change the pacifism state of kingdoms using /k admin pacifism command.

How to disable champions?

There is no single option to disable "champions", what you want to do is to disable invasions as a whole. There are many features linked to this process, and you need to disable them individually if you want the best free-invasion experience.

Tip

Before disabling invasions as a whole, take a look at the alternative invading method called Plunders.

  1. You need to disable the following commands:
  1. You need to remove the option to upgrade champions from your nexus.

  2. Disable Mass Wars since they're only used for invasions.

  3. Some misc-upgrades are invasion related, so you should remove the option to prevent players from upgrading them.

Note

For the GUI options above, you can additionally reposition the options to make them look better in the GUI and make sure they're synced across all languages' GUIs.

What are conditional variables?

Conditional variables are used to display certain outputs based on whether certain conditions are met. You can find and define them in config.yml -> variables. By default, they're used to color the player's chat messages based on their permissions in chat.yml and also to define the kingdom/nation prefixes in chat. If a player is a member of some kingdom, they'll have a prefix in chat - otherwise, there's no prefix to display so it will be "hidden".

You can also define your own conditional variables in the config.yml. As an example, we're going to modify the default groupColor variable to include more permission levels:

groupColor:
  perm_color_admin: '&6' # if player has permission "color.admin", the groupColor placeholder will output "&6" depending on where it's used
  perm_color_vip: '&a' # else if player has permission "color.vip", outputs "&a"
  perm_color_amazing: '&b' # else if player has permission "color.amazing", outputs "&b"
  else: '&r' # if none of the above conditions are met, will output "&r"

When defining your conditions, the order of them is important. Let's say that in the example above perm_color_amazing is put above perm_color_admin. Assuming that most admins are also "amazing" (have the permission color.amazing as well as color.admin), the placeholder will show the output of the perm_color_amazing condition because it matched it first.
Also, every conditional variable must have an else option defined. If there's nothing "else" that you want to display, simply set it to '', but keep in mind that it has to be defined nonetheless.

In the next example, we'll define a conditional variable that will be used to display the player's health in different colors.

# PlaceholderAPI placeholders can be used to check the conditions too!
# This example uses the %player_health% placeholder from the PlaceholderAPI's "Player" expansion
# Notice that % symbols aren't used for the placeholder when creating conditions.
playerHealth: # name of the variable
  'player_health == 20': '&aPerfect!' # if it's equal to 20
  'player_health >= 10 && player_health <= 19': '&eOkay.' # if it's between 10 and 19, including those numbers
  else: '&cBad!' # if it's any other case (below 10, since we previously covered all the possible values)

To use these conditional variables in messages, simply use {$<name>}, where <name> is the actual name of the variable you defined (eg. {$playerHealth}). However they cannot be used through PlaceholderAPI for other plugins. This feature is for Kingdoms only.

Managing the custom WorldGuard flags added by Kingdoms

Allowing claims in WorldGuard protected regions

By default, Kingdoms doesn't allow players to claim areas protected by WorldGuard. Some people, due to various reasons, want to override this behavior. Kingdoms registers the kingdoms-claimable flag to WorldGuard which can be used to allow claiming. Simply use /rg flag <region name> kingdoms-claimable allow and players will be able to use /k claim in the specified protected region. You have to set this flag to allow for every protected region in which you wish to have claiming enabled.

Allowing PvP for all players in WorldGuard protected regions

Members of the same kingdom and allies by default can't PvP each other unless both of the players that are trying to PvP enable /k pvp. This becomes an issue if you're creating a PvP arena, or some kind of server event where you want to allow all players to be able to fight each other, regardless of their relation. Kingdoms registers the kingdoms-friendly-fire to WorldGuard which allows such behavior. To enable it, simply use /rg flag <region name> kingdoms-friendly-fire allow.

Disallowing damaging the Champion in WorldGuard protected regions

When invading, players can damage the Champion everywhere on the map. This can become an issue if a claim that's near a WorldGuard region is being invaded, since players could potentially lure the champion into the WorldGuard region, which possibly has PvP or mob damage disabled. This would mean that they would be able to freely damage the champion without any threat from the defending kingdom's players.
To solve this issue, Kingdoms registers the kingdoms-damage-champion flag to WorldGuard. Use /rg flag <region name> kingdoms-damage-champion deny to disallow players from damaging champions in certain WorldGuard regions. This would mean that, while they could still lure the champion into the protected region, they would be unable to do any harm to it.

Regulating the status between strong and weak kingdoms

Kingdoms has a mechanism to prevent "strong" kingdoms from invading and enemying "weak" ones. This is useful if you want to prevent any gameplay imbalances where big and strong kingdoms are dominating the newer and smaller ones.
A kingdom is considered to be strong if it meets any of the conditions defined in invasions.yml -> strength-comparison.

The default equation uses several conditions to check whether a kingdom is considered to be "strong".
The kingdom trying to invade/enemy is the primary context of this inequation and the kingdom being enemy'd/invaded (that has other in the placeholders) is the secondary context:

strength-comparison: |
  (kingdoms_structures_total - kingdoms_other_structures_total > 50) ||
  (kingdoms_turrets_total - kingdoms_other_turrets_total > 100) ||
  (kingdoms_claims - kingdoms_other_claims > 50)

Note

All of the conditions are separated with a logical OR (||) operator, meaning that any of them can be met for a kingdom to be considered "too strong" or "too weak", depending on the context. Refer to Placeholders for a list of placeholders you can use here (you don't need to surround them in %).
If you want to disable this mechanic, simply set strength-comparison: false.

Named entity died console spam

Showing the option in spigot.yml

If you're getting a message similar to:

[15:10:36 INFO]: Named entity EntitySkeleton['Nexus Guard [Apothicas]'/81338, uuid='4f058b11-a511-4259-84a4-4bbe4acb3468', l='ServerLevel[world]', x=840.80, y=69.00, z=-1161.48, cpos=[52, -73], tl=2340, v=true] died: Nexus Guard [Apothicas] was slain by Badsinger_69

This is an annoying Spigot debugging feature which is enabled by default, and happens when you kill something that has a custom name. Custom names here mean the name tag you see above your kingdom guard/champion zombies.

To fix this, you can go to spigot.yml -> settings -> log-named-deaths and set it to false.

External Databases

If you're having issues connecting to your SQL database (MySQL, MariaDB or PostreSQL) make sure:

  • You're using the correct username, password (obviously.)
  • You're using the correct address. In most cases, just typing the server's IP is enough, you don't need to explicitly type the port. Surround the address in quotes just to make sure.
  • You're using the correct storage method. Sometimes people mistakenly use MySQL method for MariaDB databases and it might even work, but it'll be quite buggy.
  • The user you chose has grant all on minecraft.* to user; permission (assuming that the database name is minecraft)
  • The user is connecting from a host that has access to the database. When a new user is created, you can specify the hostname, if it's not specified, the user can connect from any IP. To make sure that this is not the issue set the users hostname to % using UPDATE mysql.user SET Host='%' WHERE User='username'; Or even better, just create a new user with no hostname specified.
  • Changing the default connection settings, specially the timeout settings might cause these issues.
  • For some other issues you can also visit LuckPerms SQL errors page.

Note

This only applies to external SQL databases. Meaning SQLite and H2 don't have these issues.
You could also try using MySQL Workbench (for MySQL and MariaDB) or pgAdmin (for PostreSQL) which are advanced interactive tools that help you connect to your database so you can make sure it's not a server or plugin issue.

Top kingdoms placeholders

If you're looking for a way to show what /k top command is showing but in other places (most commonly holograms), then you can use the %kingdoms_top% functional placeholder.

This placeholder is one of the most complicated and advanced placeholders in the plugin and has a unique syntax. Before anything, where you want to use these placeholders, must support PlaceholderAPI and secondly it must support refreshing and re-reading the placeholders at intervals to show updated values (whether it's a hologram or a scoreboard, which most modern plugins support.)

The general syntax for this placeholder is %kingdoms_top:at pos=<position>, of=<placeholder>%
All we have to change is the <position> and the <placeholder> parts. Everything else stays the same.
The <position> is an integer and refers to the kingdom in that position. The number starts from 1, that kingdom has the highest might. The <placeholder> can be any kingdom placeholder, for example kingdom_name

For example, %kingdoms_top:at pos=5, of=kingdom_name% gives you the name of the 5th kingdom in /k top. You might notice that we didn't use the kingdoms_ prefix or percent signs for the %kingdoms_kingdom_name% inside our placeholder, that's how you're supposed to use them.

So if we wanted to recreate /k top for the top 5 kingdoms, we would use:

  • &81. &2%kingdoms_top:at pos=1, of=kingdom_name% &8- &6%kingdoms_top:at pos=1, of=might%
  • &82. &2%kingdoms_top:at pos=2, of=kingdom_name% &8- &6%kingdoms_top:at pos=2, of=might%
  • &83. &2%kingdoms_top:at pos=3, of=kingdom_name% &8- &6%kingdoms_top:at pos=3, of=might%
  • &84. &2%kingdoms_top:at pos=4, of=kingdom_name% &8- &6%kingdoms_top:at pos=4, of=might%
  • &85. &2%kingdoms_top:at pos=5, of=kingdom_name% &8- &6%kingdoms_top:at pos=5, of=might%

How to enable ender pearls

The only way to disable "Your ender pearl landed in an enemy kingdom!" restriction is to just completely remove the anti-trample misc-upgrade which you can do by removing this text from the GUI file.

However, this doesn't affect kingdoms that already upgraded that If you want to disable the upgrade for existing kingdoms, you can disable the option in misc-upgrades.yml

In future updates misc-upgrades will be much more customizable.

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