EngineHub Addon - CryptoMorin/KingdomsX GitHub Wiki

Note

This page is still under review and information is missing.

This addon adds several features for both WorldEdit and WorldGuard plugins. Also the Outposts addon requires this addon to work.

  • Supports both WorldGuard v6 and v7.
  • The source code can be found here.

Most of this add-on's settings are located in enginehub.yml

Caution

You might want to disable schematic building support before installing this addon. For more information, read this FAQ.

WorldGuard Region Protection

Prevents players from claiming (/k claim) in WorldGuard regions. Even if a single block overlaps. Also you can define a radius to prevent players from claiming near WorldGuard regions in claims.yml.

Supports 16*255*16 chunk cuboid check, meaning that even if the region overlaps with just a single block in a chunk, that chunk cannot be claimed.

It's also used for other minor stuff such as land indicators in a WorldGuard region and used for Outpost regions.
Doesn't disable /k fly if the player enters a region that allows flight using WorldGuard Extra Flags.

WorldGuard Custom Flags

Adds many custom WorldGuard flags.

  • kingdoms-claimable Whether anyone can claim in a region (defaults to deny).
  • kingdoms-friendly-fire Whether PvP is enabled between everyone, despite their relationship (defaults to deny).
  • kingdoms-damage-champion Whether players can damage the champion in a region (defaults to allow).

WorldEdit Editing Session Protection

Prevents players from using WorldEdit operations in lands that they cannot build in.

Note

Due to how the building configs work, you need to run /k admin schematic setup for the first time after installing this addon and restarting the server to get it working. This will not be required anymore unless you reset your configs. This command mainly changes declartions/building.yml config's functional points. This command is already automatically applied when you install the addon for the first time, but if you see issues with misplaced holograms or if right-clicking your turret/nexus doesn't open a GUI, you can run the command manually to fix these issues.

WorldEdit Schematic Building Support

You can use WorldEdit schematics for turrets and structures. This also means that you can use custom models from ItemsAdder or Oraxen as long as the model you want to use depends on the block state and not on entity data. The plugin cannot recognize entities (like item frames, mobs and armorstands) as parts of the building and will not properly protect them.
You can see how different block models for ItemsAdder and Oraxen work. Normally you shouldn't do anything for these custom block models to work as WorldEdit will properly preserve all block data.

Warning

This feature of add-on will not work properly with AsyncWorldEdit and FastAsyncWorldEdit, there are sometimes small implementation details that can break things. For example, FAWE doesn't properly handle schematic loading the same way normal WorldEdit does which leads to incorrect schematic format false-negatives. This issue was attempted to be fixed by the add-on, using a forced schematic file extension renaming feature in enginehub.yml, but it was futile and other future unexpected bugs may appear that works fine with WorldEdit. In any case, report these issues if you encounter them and I'll see what I can do.

For technical people, this is a bug caused inside FAWE's ExtentBlockCopy vs WorldEdit's ExtentBlockCopy where rotTag null check is removed.

How to create a schematic for a building?

  • Build it somewhere in your world. Make sure the building isn't wider than one chunk since buildings cannot be placed in more than one chunk.
  • Select the building using WorldEdit selection tools.
  • Copy your selection using //copy
  • Save the schematic for the building you want using /k admin schematic save <file name> the file name depends on what turret/structure you want to define this schematic for. Usually, the standard way to organize this is to define a folder for a building and name the files after the turret/structure's level. Like turrets/arrow/1.schematic if you use anything else, you'd have to change where these schematics are defined inside building.yml declaration file.

Tip

Sometimes if you place the building after following these steps, you'll notice that the position of the building isn't exactly how you'd imagine it to be. You can fix the origin of a schematic using the a finer command called /k admin schematic origin

Usually a good rule of thumb for determining the origin is first finding the xz center of your schematic, but for the y, you want to target the lowest y of your schematic or 1 or 2 blocks above it. After that you can trial and error.

The rotation of your schematic is important too. Sometimes in order to make your schematic face you after placing it, you want to use //rotate 180 command as well.

After doing any of the above, you'd have to save your schematic again with /k admin schematic save to apply changes.

(The image below is actually a video, please click it so you can see the video.)

WorldEdit Schematic Building Demonstration Video

Caution

Since this add-on completely replaces the standard building process for turrets and structures, removing it will cause the plugin to panic, not knowing how to handle currently placed turrets and structures if they're linked to a schematic. So removing this add-on is almost not possible later on. If for some reasons you had to remove this add-on, the plugin will try to keep the plugin functioning, however your buildings will turn into normal blocks and only the center block will be interactable.

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