Spigot Plugin Development - 7 - Passing the Plugin Instance

Spigot Plugin Development - 7 - Passing the Plugin Instance

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



Duration: 9:39
18,279 views
0


In this episode of the Spigot MC Plugin series, I show you how to obtain an instance of your plugin's main class in another class. This is something that has to be commonly done for doing things like accessing your config.yml file or scheduling tasks. #Spigot #SpigotTutorial

My code: https://github.com/Spigot-Plugin-Development-Tutorial/instance-access
Join the Community! - https://discord.gg/cortexdev

Want to Support the Channel?
Become a Member: https://www.youtube.com/channel/UC_LtbK9pzAEI-4yVprLOcyA/join
or: https://paypal.me/kodysimpson?locale.x=en_US

My Socials:
Github: https://github.com/KodySimpson
Instagram: https://www.instagram.com/kody_a_simpson/
Twitter: https://twitter.com/kodysimp

0:00 - Introduction
0:50 - Method #1: Static getter method
4:20 - Method #2: Constructor injection
7:01 - Conclusion
8:07 - Outro

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







Tags:
plugin
spigot plugin development
spigot
development
spigot plugin
minecraft spigot plugins
how to code a spigot plugin
how to code a spigot / bukkit plugin
minecraft plugins
minecraft plugin
how to code a minecraft plugin
minecraft server plugins
plugins minecraft
tasks in spigot
randomtp plugin