The PortalSpawn Event is fired when an attempt is made to spawn a nether portal. If cancelled, the portal will not be spawned.

You will need to cast the event in the function header as this class:
crafttweaker.event.PortalSpawnEvent
You can, of course, also import the class before and use that name then.

Event interface extensions

Link to event-interface-extensions

BlockNeighborNotify Events implement the following interfaces and are able to call all of their methods/getters/setters as well:

ZenGetter类型描述
ZenGetter
valid
类型
bool
描述
If the size of portal is valid
ZenGetter
height #实体高度
类型
int
描述
The height of portal
ZenGetter
width #宽度
类型
int
描述
The width of portal