Snowiiii / Pumpkin

Empowering everyone to host fast and efficient Minecraft servers.
https://snowiiii.github.io/Pumpkin/
MIT License
3.35k stars 123 forks source link

Permission system #35

Open Snowiiii opened 3 months ago

Snowiiii commented 3 months ago

We want to have an good Permission system using SQL Databases

zp3x commented 3 months ago

I can do that.

Snowiiii commented 3 months ago

I can do that.

great, go ahead

Erb3 commented 3 months ago

I think it makes sense to use SQLite, or a similar file-based database.

Snowiiii commented 3 months ago

I think it makes sense to use SQLite, or a similar file-based database.

Yep, I already had that in mind

Bryntet commented 2 months ago

Why would we want a database for permissions, and not just store it on the player? Or are we thinking its stored on both? Like its loaded from a db when player joins?

Wundero commented 1 month ago

Why would we want a database for permissions, and not just store it on the player? Or are we thinking its stored on both? Like its loaded from a db when player joins?

Storing permissions in a database allows the server to have a lower memory overhead, especially for servers which have large numbers of permissions / online players. Database performance is quite fast and highly optimized for memory and cpu usage, and queries against permissions are relatively simple to index, so for most practical purposes, running something like SQLite in the background will be better for performance and maintainability than storing a bunch of strings on the player's struct in memory. No sense reinventing the wheel here IMO.

I think it makes sense to use SQLite, or a similar file-based database.

I think it would be nice to be able to plug+play the database in the long run, so users who want databases running on separate servers can provide a connection URL and swap from SQLite to MySQL, PostgreSQL, or some other implementation or machine, but this would be a lower priority than just implementing it to begin with on SQLite.

lokka30 commented 1 month ago

It would be very interesting if somehow LuckPerms can be ported to work far down the line. Potentially that plugin would be a great reference on what features would be useful here - particularly, design choices made in its API might be notable to consider designing Pumpkin's.

zp3x commented 1 week ago

I will try to implement sources like LuckPerms as well.