PHB
Forcecage
7-level Evocation
Casting Time: 1 action
Range/Area: 100ft
Components: V, S, M
Materials: Ruby dust worth 1,500gp
Duration: 1 hour
An immobile, invisible, cube-shaped prison composed of magical force springs into existence around an area you choose within range. The prison can be a cage or a solid box, as you choose.
A prison in the shape of a cage can be up to 20 feet on a side and is made from 1/2-inch diameter bars spaced 1/2 inch apart.
When you cast the spell, any creature that is completely inside the cage's area is trapped. Creatures only partially within the area, or those too large to fit Inside the area, are pushed away from the center of the area until they are completely outside the area.
A creature inside the cage can't leave It by nonmagical means, If the creature tries to use teleportation or interplanar travel to leave the cage, it must first make a Charisma saving throw. On a success, the creature can use that magic to exit the cage. On a failure, the creature can't exit the cage and wastes the use of the spell or effect. The cage also extends into the Ethereal Plane, blocking ethereal travel.
This spell can't be dispelled by
Dispel Magic.