Skip to content

Callback: render

Misat11 edited this page May 11, 2020 · 4 revisions

render (Groovy only)

This callback is used for handle item generation from groovy file. Can be used with single item or with all items. These callbacks are called while GenerateItemEvent is called.

inventory {
   render {
     player.sendMessage 'This message you will see when any item is generated!'
   }

   item ('STONE')
   item ('GRAVEL') {
     render {
       player.sendMessage 'This message you will see just when this specific gravel is rendered'
     }

     /* Items inside category won't be affected with parent's callbacks */
     item('DIRT')
   }
}

All methods available inside render can be found here

Clone this wiki locally