Jump to content

Recommended Posts

Posted

I have been working on a research api and was trying to find a way to allow the coder to intervene when the player researches something. The best way i can think to do this is create an event that the coder can use to determine what they want to do like they BreakEvent in BlockEvent. i just need to understand how these are created. i have looked at the Universal Electricity code on there custom event but it wasn't very helpful.

Posted

Make a class to extend Event.

Use an EventBus then #post(event) when the event needs to be sent.

Use @Cancelable or @HasResult depending on what you want the event effect to be...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.