Spigot Plugin Development - 3 - Event Listeners in External Classes and Cancellable Events

Spigot Plugin Development - 3 - Event Listeners in External Classes and Cancellable Events

Channel:
Subscribers:
32,299
Published on ● Video Link: https://www.youtube.com/watch?v=_DScPFkf7JM



Duration: 17:35
35,709 views
795


In this episode, I show you how to make event listeners in classes outside the main plugin class and then how to cancel events from inside their listener. #Spigot #SpigotDevelopment

Code: https://github.com/Spigot-Plugin-Development-Tutorial/event-listeners-2

⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've tried it and it's awesome! https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=kodysimpson&utm_content=description-only

Discord: https://rebrand.ly/discordlink
Become a Member: https://www.youtube.com/channel/UC_LtbK9pzAEI-4yVprLOcyA/join
Github: https://github.com/KodySimpson
Instagram: https://www.instagram.com/kody_a_simpson/
Twitter: https://twitter.com/kodysimp

0:00:00 - Intro
0:00:36 - Event Listeners in separate classes
0:01:30 - Example 1 (ExpBottleEvent)
0:03:52 - Registering the listener
0:07:38 - Cancelling the events
0:09:28 - Example 2 (PlayerShearEntityEvent)
0:16:26 - Outro

More Videos coming soon.
Leave a comment for any future video suggestions.







Tags:
programming tutorial
spigot tutorial
spigot event listeners
bukkit event listeners
minecraft events
plugin development
mc plugins