Advanced Bukkit Coding - MySQL Database - Episode 4 (2/2)

preview_player
Показать описание
Thank you for tuning in to this video! We wanted to give you a quick update: as of December 19, 2023, we've reset all our video descriptions. We apologize if you were searching for a specific link mentioned in this video, but here's the great news – Google makes it incredibly convenient to find what you're looking for! If you have any questions or need assistance, feel free to drop a comment below. Your understanding is truly appreciated, and we look forward to providing you with more exciting content in the future. Stay tuned and thank you for your continued support!

Join us on Discord:
____________________________
💻 View all our code:

🌌Need a VPS, chose SkySilk:

🐙Join GitKraken:
____________________________

Music from #Uppbeat (free for Creators!):
License code: 95IHGXH3WE6WJJ4A

#TheSourceCode #NewEra #CodingRevolution #PrepareToLevelUp
Рекомендации по теме
Комментарии
Автор

This tutorial (and the playlist) has helped me a lot! I know it is kinda old, but Thank You!

filipeemelo
Автор

Huge shoutout, I though MySql was pretty "hard" before, I knew how to do, But didn't understand everything!
Now I do!
Thank you buddy. :D

aflamegame
Автор

Great series. Very educational and easy to follow along with. Something I'd be very interested in (for educational purposes) is to watch a proper video (created by you) on how to create a GUI menu. You created a custom inventory before, however, I'm not entirely sure if it was the exact same as a GUI menu. If it was then I'll have to rewatch that. Good luck on your future content, and know that people are watching videos.

Kind regards,
Ares.

CV
Автор

Thanks a lot. I’m learning programming thanks to you

truestopguardatruestop
Автор

Can I store some code in my database and update it whenever I want to like make an auto updater plugin?

Skycrafter_
Автор

Umm shouldn't we close the connection when we're done and then we can just open it when we need it?

StackableGoldMC
Автор

I might have missed it in the video, but it might be a good idea to close the connection in the onDisable() so there aren't any lingering connections.

dylanroberts
Автор

Should we be closing the connection to the database at some point? I don't really know what im talking about, but read "that you need to explicitly close it by calling its close() method in order to release any other database resources (cursors, handles, etc) the connection may be holding on to".

KicksMedia
Автор

Hello kind YouTuber. This is a very good tutorial but it doesn't work on 1.17.1 for some reason. Could you help me out?

dssdfsdfdsf
Автор

These MySQL tutorials are an absolute shame. It's disappointing to see such bad practices being promoted to a large audience. This is not the right way you should be handling connections and JDBC objects. The problems with the code in these 2 videos are multiple.

For one, Connections should not be kept open like this. That will lead to network timeout problems, performance bottlenecks due to connection, and race conditions should you start to use more advanced JDBC concepts. Instead, you should wrap all your Connection instances you retrieve in try-with-resources blocks to ensure they are closed when you're done with them. The same try-with-resources construct should be used for PreparedStatement and ResultSet, since it is good practice to close all your closable resources.

For two, you should avoid handling exceptions by printing the stacktrace and continuing on as if nothing happened. Downstream code calling these methods will be surprised to find the operation was in fact unnsuccessful. Instead, rethrow the exception or indicate failure to the caller some other way.

For three, these IO operations being executed on the main thread is going to kill performance.

For four, the code quality is very poor and highly coupled. You should pass the instance of your main class rather than using JavaPlugin.getPlugin. Use proper visibility on fields and make them final where possible. Also, if you are making anything other than a small plugin, organise your connection setup to another class, such as a database manager object.

If anyone is truly interested in learning the best practices with regards to database operations, avoid video tutorials. Leave the confined world of plugins and read a tutorial on SQL and then JDBC. Before you even do that, consider learning how to handle exceptions properly. Finally, start learning about how to work with IO operations asynchronously, the right way ("just running things async" is a terrible way to go).

anandbeh
Автор

Where would their uuid be stored for each player?

joesteggles
Автор

how do you create tables with the plugin? cause i dont think everyone is just gonna go and create HUNDREDS of tables manually

HartFang
Автор

Can you help me?
How do I make the player to right click on an item inside an INVENTORY to do one action and when left click do another?

Jeean
Автор

I'm getting an error with in the create player method EDIT: Fixed it, forgot to set the name of the table in the main class

alfredo
Автор

Can you do a Advanced bukkit coding on bungeecord?

henkiet
Автор

I love these man, would love to work on something together someday

jessebarrass
Автор

Your keyboard is so loud, its annoying. other from that a usefull tutorial.

huntifi
Автор

While this is good for beginners, it wouldn't be practical to use on a server without a CP. Though good video nonetheless.

maxf