Skip to content

Instantly share code, notes, and snippets.

@krsmes
Created January 22, 2011 03:38
Show Gist options
  • Save krsmes/790832 to your computer and use it in GitHub Desktop.
Save krsmes/790832 to your computer and use it in GitHub Desktop.
def block
def player
def map = [door1: [x: 1, y: 2, z: 3, owner:'krsbuilt'], door2: [x: 4, y: 5, z: 6]]
def found = map.find{ k,v -> v.x == block.x && v.y == block.y && v.z == block.z }
if (found) {
if (found.value.owner != player.name) {
// cancel action
}
}
map[doorname]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment