WarzoneMC / tgm

Team Game Manager - Minecraft PVP Suite
https://warzone.network
40 stars 37 forks source link

Add Random Region Locations #760

Closed Atdit closed 3 years ago

Atdit commented 3 years ago

Two types of region spawn points can be used: Absolute and relative ones. A relative region spawn point will make the player face whatever coordinates are given in the "face-coordinates" variable. An absolute region spawn point will by default use yaws and pitches of 0, or whatever is given in the corresponding variables.

{   
    "teams": ["red"],
    "region": {
        "id": "red-spawn-1", "type": "cuboid",
        "min": "255, 50, 223", "max": "310, 50, 223"
    },
    "yaw": 90,
    "pitch": 30
}

Local region registration. Uses absolute yaws and pitches

{   
    "teams": ["blue"],
    "region": "blue-spawn-1",
    "face-coordinates": "257, 53, 276"
}

Reference to a global region. Uses relative yaws and pitches

The pre-existing spawn points which only use single locations are 100% compatible with this commit.

Closes https://github.com/Warzone/TGM/issues/245 Closes https://github.com/Warzone/TGM/issues/622