XML File Examples

If you’re interested in the backstory of harb read: The Story of Harb - By SH4D0W_HAWK

Specify the XML file version and then open the main map module and specify the maps name, version and objective.

<?xml version="1.0"?>

<map proto="1.4.2">
<objective>Be the team with the least amount of deaths after 10 minutes.</objective>

This map has 2 major authors specified and no contributors.

    <author uuid="1379cb6e-f291-4498-9807-e636f9674ac0"/> <!--  SH4D0W_HAWK  -->
    <author uuid="ef4ea031-998f-4ec9-b7b6-1bdd428bcef8"/> <!--  Plastix  -->

Define two teams, their colors and names.

    <team id="blue-team" color="blue" max="50">Blue Team</team>
    <team id="red-team" color="dark red" max="50">Red Team</team>

Custom filter definition that denies TNT blocks. When applied to a region with block="" it denies placing and breaking. To only deny placing apply it with block-place="".

    <deny id="no-tnt"><material>TNT</material></deny>

Define several regions with ID’s. Apply the no-tnt filter to the region bases and never allow block placing/breaking in the portals-area region.

    <rectangle id="main-area" min="-50,-32" max="51,33"/>
    <union id="bases">
        <rectangle id="blue-base" min="-20,-62" max="21,-32"/>
        <rectangle id="red-base" min="-20,33" max="21,63"/>
    <complement id="portals-area">
        <rectangle min="-56,-2" max="57,3"/>
        <region id="main-area"/>

    <apply block="never" region="portals-area"/> <!-- protect portal areas -->
    <apply block="no-tnt" region="bases" message="You may not place TNT in the bases."/>

Each team kit has leather armor colored in their team color and they inherit the main spawn kit.

    <kit id="spawn">
        <item slot="0" material="stone sword"/>
        <item slot="1" enchantment="arrow infinite:1" material="bow"/>
        <item slot="28" amount="1" material="arrow"/>
        <item slot="3" amount="64" material="cooked chicken"/>
        <item slot="2" amount="2" material="TNT"/>
        <item slot="5" amount="32" material="ladder"/>
        <item slot="4" amount="3" material="golden apple"/>
        <item slot="6" name="TNT Defuser" lore="`7Right click to defuse teammate's TNT" material="shears"/>
        <item slot="7" damage="8194" material="potion"/> <!-- potion of swiftness 1 -->
        <potion duration="5">heal</potion>
        <potion duration="10">damage resistance</potion>
    <kit id="red" parents="spawn">
        <helmet color="cd0000" unbreakable="true" material="leather helmet"/>
        <chestplate color="cd0000" enchantment="protection explosions:3" unbreakable="true" material="leather chestplate"/>
        <leggings color="cd0000" unbreakable="true" material="leather leggings"/>
        <boots color="cd0000" unbreakable="true" material="leather boots"/>
    <kit id="blue" parents="spawn">
        <helmet color="0066cc" unbreakable="true" material="leather helmet"/>
        <chestplate color="0066cc" enchantment="protection explosions:3" unbreakable="true" material="leather chestplate"/>
        <leggings color="0066cc" unbreakable="true" material="leather leggings"/>
        <boots color="0066cc" unbreakable="true" material="leather boots"/>

Harb has pretty unique spawns in that they are cuboids covering a large area of the map that transverse multiple Z levels. This allows players to spawn on roofs and inside buildings. Because of this safe="true" is specified to prevent players from spawning midair or in walls. The <point> definition is a failsafe in case the PGM plugin can’t find a safe spawn inside the region.

    <spawns safe="true" sequential="true">
        <spawn team="blue-team" kit="blue" yaw="0">
            <cuboid min="-15,32,-57" max="16,42,-32"/>
        <spawn team="red-team" kit="red" yaw="180">
            <cuboid min="-15,32,33" max="16,42,58"/>
    <default yaw="90"><cuboid min="-75.5,42.5,-0.5" max="-73.5,42.5,1.5"/></default>

These portals link two opposite sides of the map together. They move the players current position by 110 blocks so that they end up infront of the other portal.

    <portal x="110">
        <cuboid min="-56,33,-1" max="-55,35,2"/>
    <portal x="-110">
        <cuboid min="56,33,-1" max="57,35,2"/>

Set the game type to team deathmatch and specify a max run time of 10 minutes.


Repair stone swords, bows, and shears when dropped or when the player picks one up.

    <tool>stone sword</tool>

Remove armor, arrows, ladders, cooked chicken, etc. To prevent the playing field and player inventories from getting cluttered with items.

    <item>leather helmet</item>
    <item>leather chestplate</item>
    <item>leather leggings</item>
    <item>leather boots</item>
    <item>cooked chicken</item>
    <item>glass bottle</item>
    <item>golden apple</item>
    <item>clay ball</item>
    <item>glowstone dust</item>

Give players a golden apple every time they kill an enemy.

    <item material="golden apple"/>

Instantly ignite TNT when placed and disable TNT explosions from breaking blocks.


Disable damage from TNT placed by teammates.

    <damage ally="true" self="false" enemy="false" other="false">block explosion</damage>

Close the main <map> module.