Skip to main content

Harb (TDM)

Harb is a team deathmatch map where you help your team in getting the most kills in 10 minutes. Players spawn with a permanent speed effect and TNT that instantly ignites when placed in the world, making it frantic and fast paced.

Source: Harb by SH4D0W_HAWK and Plastix Players spawn on opposite ends of the map and can run around with infinite speed.

The large spawn island for harb, where players initially spawn at when the map is loaded.

➡️ Every map XML file starts with the XML header and then the base <map> module.

<map proto="1.4.2">
<!-- Specifies what the map is called -->
<name>Harb</name>
<!-- Shows the map creation date when a user runs /map in game -->
<created>2012-03-02</created>
<!-- States what version the map is -->
<version>1.3.14</version>
<!-- Tells the teams what the objective is in order to win the game -->
<objective>Be the team with the least amount of deaths after 10 minutes.</objective>
<!-- States who made the map -->
<authors>
<author uuid="1379cb6e-f291-4498-9807-e636f9674ac0"/> <!-- SH4D0W_HAWK -->
<author uuid="ef4ea031-998f-4ec9-b7b6-1bdd428bcef8"/> <!-- Plastix -->
</authors>

➡️ Define the teams' colors, names, and how many people can be on each team.

<teams>
<team id="blue-team" color="blue" max="32">Blue</team>
<team id="red-team" color="dark red" max="32">Red</team>
</teams>

➡️ Define the kit that players will receive.

<kits>
<kit id="spawn-kit">
<clear/>
<item slot="0" unbreakable="true" material="stone sword"/>
<item slot="1" unbreakable="true" material="bow">
<enchantment>infinity</enchantment>
</item>
<item slot="28" material="arrow"/>
<item slot="2" material="golden apple"/>
<item slot="3" amount="32" material="ladder"/>
<item slot="4" amount="2" material="tnt"/>
<helmet unbreakable="true" team-color="true" material="leather helmet"/>
<chestplate unbreakable="true" team-color="true" material="leather chestplate">
<enchantment level="3">protection explosions</enchantment>
</chestplate>
<leggings unbreakable="true" material="chainmail leggings">
<enchantment level="3">protection projectile</enchantment>
</leggings>
<boots unbreakable="true" material="iron boots"/>
<effect duration="6s">heal</effect>
<effect duration="6s">damage resistance</effect>
<effect>speed</effect>
</kit>
</kits>

➡️ Specify where the previously defined teams will spawn, the kit they will spawn with, and what direction they face.

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

➡️ Define the filters on the map and determine which events are allowed.

<filters>
<!-- Always deny if the queried material is TNT -->
<deny id="no-tnt">
<material>tnt</material>
</deny>
</filters>

➡️ These regions reference the filters defined above and states where they will work.

<regions>
<union id="playable">
<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"/>
</union>
<complement id="portals-area">
<rectangle min="-56,-2" max="57,3"/>
<region id="main-area"/>
</complement>
</union>
<!-- applicators -->
<apply region="portals-area" block="never"/> <!-- Nothing can destroy blocks inside portals-area -->
<apply region="bases" block="no-tnt" message="You may not place TNT in the bases."/>
<apply region="playable" leave="never" message="You can't leave the map!"/>
</regions>

➡️ Define the portals that players can walk through.

<portals>
<!-- Moves the player +110 blocks in the X axis, coordinates are relative -->
<portal x="110">
<region>
<cuboid min="-56,33,-1" max="-55,35,2"/>
</region>
</portal>
<portal x="-110">
<region>
<cuboid min="56,33,-1" max="57,35,2"/>
</region>
</portal>
</portals>

➡️ Set a 10 minute time limit for the map. The team with the most points after time is up wins.

<!-- Gain 1 point for killing a player, team with most points after 10 minutes wins -->
<score>
<kills>1</kills>
</score>
<time>10m</time>

➡️ We do not want an excessive amount of items dropped on the map, so this allows us to manage how to deal with dropped items more easily.

<!-- These items will drop, players that already have these items can pick it up and will be merged -->
<toolrepair>
<tool>stone sword</tool>
<tool>bow</tool>
</toolrepair>
<!-- If the player has these item, it will be saved in their inventory -->
<itemkeep>
<item>arrow</item>
<item>golden apple</item>
</itemkeep>
<!-- All of these items will be automatically removed when dropped -->
<itemremove>
<item>leather helmet</item>
<item>leather chestplate</item>
<item>chainmail leggings</item>
<item>iron boots</item>
<item>ladder</item>
<item>glowstone dust</item>
<item>string</item>
</itemremove>

➡️ Reward players by giving a golden apple for killing an enemy.

<!-- Player gets a golden apple after killing a player -->
<kill-rewards>
<kill-reward>
<item material="golden apple"/>
</kill-reward>
</kill-rewards>

➡️ This makes TNT instantly ignite when placed and prevent it from damaging any blocks.

<tnt>
<!-- TNT will automatically ignite when placed -->
<instantignite>on</instantignite>
<!-- Do not require a license so TNT usage is not restricted -->
<licensing>off</licensing>
<!-- Players can't defuse a teammate's TNT -->
<friendly-defuse>off</friendly-defuse>
<!-- TNT will not break any blocks but still cause damage to players -->
<blockdamage>off</blockdamage>
</tnt>

➡️ Use the disable damage module to configure who gets damage from TNT explosions.

<!-- TNT damages enemies and self, but not teammates -->
<disabledamage>
<damage ally="true" self="false" enemy="false" other="false">block explosion</damage>
</disabledamage>

➡️ Players do not need to worry about hunger in this map, so hunger is disabled.

<!-- Prevent hunger from depleting -->
<hunger>
<depletion>off</depletion>
</hunger>

➡️ Close the main <map> module.

</map>