OMGPIDocs

OMGPI

Source

JavaDocs

SpigotMC

Mapfig and Map setup

Maps are folders, which get completely copied when loading by OMGPI. So a proper map should have a level.dat, /region/.mca files and a mapfig.
Mapfig is a file /plugins/OMGPI/games/GameName/maps/MapName/map.omgc. It manages map options, like teams, areas and spawns.
players: 8
description:
- Default Description
- Plugin and/or map by Staff
winMessage: '&3&l<---> %winner% &3&l<--->'
teams:
  id:
    name: '&aExample team'
    prefix: '&a'
    kits:
      KitName:
      - '{id:dirt,Count:1,Probability:100}'
areas:
  name:
    coords: 0,0,0
    allowBurn: false
    allowFlow: false
    canExplode:
    - MaterialID
    - '*'
    - -excludeID
    teamid:
      gameShop: false
      canBreak:
      - MaterialID
      - '*'
      - -excludeID
      canPlace:
      - '*'
      - -excludeID
      cancelDamage:
      - OMGDamageCause
      - '*'
      - -excludeID
      effects:
      - {id:BukkitPotion,ticks:1000000,level:0}
      teleport: 0,0,0,0,0
      velocity: 0,0,0
loots:
  Prefix_LootName:
  - '{id:dirt,Count:1,Probability:100}'
Any game-related data here...

Basics

First thing you see is players - this is maximum players amount for the map. Any other players are randomly not allowed to join.
Next - map description. This is a list of messages that get sent when game starts. Specify map name, authors and maybe some map info here.
And last basic is win message - the message that gets sent on game end. %winner% is the game winner. Make sure to reset formatting after them, because their name may contain own formatting.

Teams options

Each team has own options for players. Such options may not exist, then OMGPI defaults will be used. Team ids are usually a,b,... and 2 teams are made by OMGPI - default and spectator. In the team options you may find name - that is how the team will be shown in game, and prefix - that is added before player's name. The kits option is the kit items specific to the map - those will be used instead of ones defined in .kit file.

Areas

Area is a cuboid region with custom some custom options. A must option is coords - this is either 1 block x,y,z or a cuboid x1,y1,z1,x2,y2,z2.
Next options may not exist - then they will be false. There are teamless area options:
  • allowBurn - allow blocks burning down.
  • allowFlow - allow liquids moving from block to block.
  • canExplode - allow explosions to remove specific blocks. You can use either a Bukkit Material ID (notice, shovels are called spades for some reason), or '*' to allow breaking any blocks. Using - -ID will remove ID from list, useful, for example, when working with '*' - it will be like "All but this".
And there are team options - work when team player is in the area:
  • gameShop - allow team players to click on blocks to open /shop.
  • canBreak - allow team players to break specific blocks. You can use either a Bukkit Material ID (notice, shovels are called spades for some reason), or '*' to allow breaking any blocks. Using - -ID will remove ID from list, useful, for example, when working with '*' - it will be like "All but this".
  • canPlace - same as previous but with placing.
  • cancelDamage - disallow team players to take specific damage. There is '*' cancelling all damage or write all OMGDamageCauses you want to cancel. Using - -ID will remove ID from list, useful, for example, when working with '*' - it will be like "All but this".
  • effects - give team players potion effects. The effect is NBT-like string with tags id - a Bukkit PotionEffectType, ticks - potion effect length in game ticks (1/20 second) and level - effect's level, where 0 is level 1.
  • teleport - teleport team players to a x,y,z,yaw,pitch location.
  • velocity - push players by specific vector. For example, 0,1,0 will push player upwards.

At last,

There are loots - same principle as kits, but with .loot files. There are also options added by game plugins, like spawns - list of x,y,z,yaw,pitch locations.