How to set a world border in Minecraft

How to set a world border in Minecraft

A world border in Minecraft restricts the playable area in your world, ensuring players remain within a designated zone. It helps manage server resources, keeps exploration within limits, and prevents players from wandering too far.

This guide will walk you through setting up a world border in Minecraft, provide customization tips, and answer frequently asked questions.

Setting up a world border in Minecraft

Setting up a world border in Minecraft is simple and straightforward – we’ll go over two methods to do so by using the game’s built-in server commands.

Using Game Panel

If you are using Hostinger’s Game Panel to host your game server, you can run commands directly on the server’s console. This requires no additional in-game permissions or setup:

1. Log in to hPanel and navigate to the VPS page. Find your Game Panel server and click on Manage.

2. Press Manage Panel and log in with your credentials.

3. In the Instances section, locate your Minecraft server and press Manage.

4. Click on Console on the left side menu. Then, you’ll be taken to a tab where you can directly enter server commands.

Using in-game commands

You can also run commands directly in-game. This requires you to give your account OP permissions. Once that is done, follow these steps to execute commands:

  1. Log into your game server with an OP account.
  2. Open the in-game chat by pressing the T key by default. You will be able to directly enter server commands into the chat.

The command that we will use to set and manipulate the world border feature is /worldborder.

Important! World borders are only supported on Minecraft Java edition. Bedrock edition servers require adding plugins to use the worldborder command.

Set the center of the world border

The world border’s center determines the focal point of the restricted area. To set the center, use the following command:

/worldborder center <x> <z>  

Replace <x> and <z> with the coordinates where you want the center of the border to be located.

For example, if you want the center to be at coordinates 100, 200, the command will look like this:

/worldborder center 100 200  

Define the border’s diameter

Once the center is set, you’ll need to define the world border size by setting a diameter. Use the command:

/worldborder set <size>  

Here, <size> is the diameter in blocks.

For instance, to create a border with a 1000-block diameter:

/worldborder set 1000  

This immediately establishes a square border with a 500-block radius from the center.

Adjust the border gradually

You can adjust the world border size over time for a smoother transition. This is especially useful on multiplayer servers to avoid sudden disruptions for players. Use the command:

/worldborder set <size> <time>  

For example, to shrink the border to a 500-block diameter over 30 seconds:

/worldborder set 500 30  

By default, the border appears as a visible wall of shifting colors, marking the boundary. Players can see it and will be restricted from going beyond it.

Additional border settings and customizations

Once the world border is set, you can further fine-tune its behavior to improve the gameplay experience.

Control damage at the border

Players who try to cross the border will take damage by default. You can adjust the amount of damage inflicted using this command:

/worldborder damage amount <value>  

For example, to set the damage to 2.0 hearts per second:

/worldborder damage amount 2.0  

Additionally, you can set a world border warning distance.

/worldborder damage buffer <value>

This defines how far (in blocks) a player can be outside the border before damage begins.

For instance, to allow a 5-block world border buffer:

/worldborder damage buffer 5  

Adjust Warning Messages

To alert players as they approach the border, you can configure warning parameters:

Set warning distance:

/worldborder warning distance <value>  

For example, to warn players when they are 10 blocks away from the border:

/worldborder warning distance 10  

Set warning time:

This lets you set a world border warning time:

/worldborder warning time <value>  

The number of seconds before the border shrinks to display a warning message. For instance, to show a warning 15 seconds before a border adjustment:

/worldborder warning time 15  

With these settings, you can ensure players are aware of the border’s presence and any impending changes.

Conclusion

A world border is a powerful tool for managing a Minecraft server. It ensures players stay within designated boundaries, conserves resources, and provides structure to your world. By following the steps outlined in this guide, you can set up and customize a world border that enhances your server’s gameplay experience.

Experiment with different sizes, transitions, and settings to find what works best for your needs. Whether you’re running a competitive server or simply organizing an adventure map, a well-configured world border will keep everything running smoothly.

How to set a world border in Minecraft FAQ

What command sets a world border in Minecraft?

Use the /worldborder command to set and customize a world border. For example, /worldborder set defines the diameter of the border. The command is only supported on Minecraft Java edition out of the box.

How do I change the size of the world border?

To adjust the size of the world border, use the command: /worldborder set  
You can also add a time parameter to make the adjustment gradual, like this: /worldborder set 500 30

Can I set a world border in survival mode?

Yes, but you’ll need to have cheats enabled in your world. Alternatively, use a command block to execute the /worldborder command in survival mode.

What is the maximum size for a world border?

The maximum size for a world border is 60,000,000 blocks in diameter. This effectively encompasses the entire playable area of a Minecraft world.

Author
The author

Dominykas Jasiulionis

Dominykas is a Technical Content Writer with a background in cloud engineering and technical support. He’s operated in fields like fintech and point-of-sale and is passionate about software development, DevOps, and AI. Find him on LinkedIn