Quick Nav


Back To Top

Overview

TerritoryZone is a mod that lets you declare zones in your world as the territory of a given player or players, and allows you to optionally log or prevent others' actions inside that region, including breaking blocks, placing blocks, opening GUIs, and killing animals. By default, logging is enabled but actual enforcement is disabled.

Zones present themselves in two ways.
One, when a player is in a zone they do not own, they see a notification onscreen about their being in that territory, and are warned not to take actions like mining without permission.

Two, zones render in-world (akin to the glowing barriers seen in MMO game worlds, or track boundaries in racing games) to show their extent easily.

Holding tab lets a zone be visible from the inside, and lets owners know they are inside the zone.

Configuration

As of v32b [1.7.10], zones are defined using the LuaBlock system, using the following schematic:
{
type = "example"
dimension = ?
color = ?
radius = ?
shape = ?
position = {
x = ?
y = ?
z = ?
}
owners = {
{
username = ?
uuid = ?
}
...
}
settings = {
BREAK = {
chat = true/false
log = true/false
protect = true/false
}
PLACE = {
chat = true/false
log = true/false
protect = true/false
}
GUI = {
chat = true/false
log = true/false
protect = true/false
}
ANIMALS = {
chat = true/false
log = true/false
protect = true/false
}
PVP = {
chat = true/false
log = true/false
protect = true/false
}
ITEMS = {
chat = true/false
log = true/false
protect = true/false
}
FIRESPREAD = {
chat = true/false
log = true/false
protect = true/false
}
RESOURCE = {
chat = true/false
log = true/false
protect = true/false
}
}
}


As always, territory definitions can inherit from other definitions, allowing for easy definition of many territories from a base template, without needing to repeatedly re-specify shared properties. For example:
{
type = "base"
dimension = 0
color = 0xff0000
radius = 1024
shape = "PRISM"
settings = {
BREAK = {
chat = true
log = true
protect = false
}
PLACE = {
chat = false
log = true
protect = false
}
GUI = {
chat = false
log = true
protect = false
}
ANIMALS = {
chat = false
log = true
protect = false
}
PVP = {
chat = true
log = true
protect = false
}
ITEMS = {
chat = false
log = true
protect = false
}
FIRESPREAD = {
chat = false
log = false
protect = false
}
RESOURCE = {
chat = true
log = true
protect = false
}
}
}
{
type = "someone"
position = {
x = 103
y = 92
z = -1328
}
owners = {
{
username = "SomePlayer"
uuid = ""
}
}
settings = {
PLACE = {
chat = true
log = true
protect = false
}
}
}
{
type = "someone_else"
color = 0x00ffff
position = {
x = 7822
y = 27
z = 5483
}
owners = {
{
username = "OtherPlayer"
uuid = "
"
}
}
}

Specific Properties

Zones can be the following shapes:
  • Spherical - all points within a given radius of the center are in the zone
  • Cylindrical - all points whose XZ planar pythagorean distance to the center are less than the radius are in the zone
  • Cubic - all points whose X, Y, and Z distances to the center are less than the radius are in the zone
  • Prism - all points whose X and Z distances to the center are less than the radius are in the zone
Zones can be of any size, from 0 to 2.147 billion blocks in radius, and can be declared at any location in any dimension. They can have any number of owners - though they need at least one, and can have a specified color for in-world rendering.

"Settings" controls the specific events you wish the territory to apply to, including breaking and placing blocks, opening GUIs, killing players, and collecting dropped items. Each event is configurable independently, and can be set to do almost any combination of three things. log, the default and "lowest" level, logs non-owner events inside the territory to a log file, for reference later if the owner - for example - finds damage or missing items. chat is the same idea as log, and will only apply if log is enabled, and will mirror those log messages into a chat message sent to the territory owners when they occur. protect, the most aggressive flag, will actively prevent the action listed, and can be set independently of logging options.

The following event types are available:
  • BREAK - Block Breaking
  • PLACE - Block Placing
  • GUI - Opening GUIs
  • ANIMALS - Killing Animals
  • PVP - PvP (not just to zone owners)
  • ITEMS - Item Pickup
  • FIRESPREAD - Fire Spread
  • RESOURCE - Resource Harvesting

Loading and Commands

Zones can be added, removed, and changed without restarting the server; much like MineTweaker, the zones are declared in a special config file, which can be reloaded at any time with the command /reloadterritories, which will update every client logged into the server.

Overlapping zones are permitted but are flagged by the loader, and notify the server admin and the owner of the zone.

There is another command, /gototerritory, which will warp a player back to the center of their territory if and only if they are not already inside their territory at all. This allows them to use it as a "get home from very far away" command, without allowing it to work as a generalized "return home from every trip".

Configuration Settings

This mod contains several config options to modify values and behaviors - such as for balance or server safety concerns, or simply personal taste - to your preferences. Note that several settings may have bounds imposed on their values, either logically or explicitly; these can usually be seen in the actual settings files or ingame. These are listed in order found in the source code, which is generally the order in which they were added; They may be present in a different order ingame or in the configuration files.
The settings for the mod, when installed, can be found in the 'config/Reika' subfolder of the MC instance.

Do in-zone overlay

Type: boolean
Current Default Value:
true

Fade Overlay In and Out

Type: boolean
Current Default Value:
false

Shrink Overlay

Type: boolean
Current Default Value:
false

Intercept Fake Players

Type: boolean
Current Default Value:
true

Log to Dedicated File

Type: boolean
Current Default Value:
true

Teleport Command State

Type: int
Current Default Value:
2
0 = Disable the command, 1 = Admins only, 2 = Anyone can use.

Allow GotoTerritory Command Interdimensionally

Type: boolean
Current Default Value:
false


Downloads

Via CurseForge