What does event object contains?
TheRadioGuy opened this issue ยท 2 comments
events.blockBreak( function( event ) { echo( event.player, 'You broke a block!'); });
what does event object contains?
You can look directly atspigot's doc to checkj all the parameters and methods of an event (it depends on each kind of event).
Alternatively, you can also simply store the event object in a variable to inspect it after :
var saveEvent; events.blockBreak(function(event){saveEvent = event;}); exports.getEvent = function(){return saveEvent;};
For any event you can find out more about that event by visiting the API docs https://github.com/walterhiggins/ScriptCraft/blob/development/docs/API-Reference.md#eventsblockbreak and following the references from there to the spigot API docs.