# block

you get a `block` value from events like `PlayerInteract`, `BlockBreak`, `BlockPlace`, `ProjectileHit`, and `BlockExplode`

---

## properties

```csharp
block.type //block type
block.location //block location object
block.world //block world
block.x //the x-coordinate of this block
block.y //the y-coordinate of this block
block.z //the z-coordinate of this block
```

## methods

```csharp
block.setType(material)
```

---

### `setType`

sets the block to a target material

```csharp
block.setType(material)
```

| parameter | default | description |
| --- | --- | --- |
| `material` | *required* | case insensitive vanilla block material name string |

#### example

```csharp
block.setType("glass") // sets the block to glass
```

---
