Jump to content
Live Updates


Popular Content

Showing content with the highest reputation since 01/14/2019 in all areas

  1. 1 point
    Right, so a few people said they liked the content in the last ( and first ever ) Boring Dev Log, so I suppose I should make a franchise out of it. To start off with, how about a sequel? AtherysTowns Today, I'm going to go over the pains I've been having with the AtherysTowns plugin, specifically focusing on the permission system, as that has been the most painful part of it, causing me to rewrite the plugin from scratch. Again, to preface this, I doubt many would get any enjoyment out of this thread. And this one in particular is more of a rant on my part, getting something off my chest about permission management in general ( not just in minecraft ). Permission Management Is Hard It just is. It's frustratingly hard. That's not to say that permission handling models don't exist out there, they do, but they're mostly intended for enterprise-level applications. Things like Access Control Lists ( ACLs ), Attribute Based Access Control ( ABAC ), which is itself an improvement of the Role-based Access Control ( RBAC ) approach, which can itself be used to implement Lattice-based access control ( LBAC ). Did you understand any of that? Yeah, neither did I. Security in general is a very broad subject, requiring a lot of specialization in order to be considered an "expert" on it. I am certainly not one such person. And if you came to me and told me "Hey, maybe find an Informational Security Expert to help you out with the permission part of this minecraft plugin", I would have probably ignored you because that's too much effort for a bloody minecraft plugin. Yet, here we are, after having written and rewritten the permission system of AtherysTowns a good dozen times, I slightly regret not having done my research better. Now that that's off my chest, let's get into the boring parts... So How Will Permissions Work in AtherysTowns? Before we get into the details, let's establish a few basic concepts. Broadly speaking, we have 2 types of objects in our plugin. We have actors ( those who can execute actions ), and subjects ( objects which are acted upon by an actor ). We also have 4 types of entities in the plugin, which is the Nation, the Town, the Plot and the Resident ( which represents a player ). A Nation contains many towns, a Town contains many Plots and Residents. There are other things which are part of these entities as well, but those are just noise for the purposes of the permission plugin and don't matter. So then, here's the first important question: Which of these are Actors, and which of these are Subjects? The answer seems simple at a glance: Residents are actors, and all others are subjects, right? Well, yes and no. If we say that only Residents are Actors, then we have to deal with certain limitations. Imagine the following: How does the mayor go about doing this? If we accept that only Residents are actors, they would have to manually permit all residents from Town B to build upon Plot C. Fine, say they do that. What if one of those residents leaves their town? The plugin wouldn't be able tell if the resident was added because they were part of a town ( Town B in this case ), or because they were explicitly permitted, independent of any town, to change the plot. The way to fix this, is to have a way for the mayor of Town A to permit Town B ( as an object ) to modify Plot C. But because we've already said only Residents are Actors, we can't do that. There are a few possible solutions to this. What I've done is I've just said "Ok, so not only Residents are Actors, but also any entities which contain residents". What this results in is the following: Plots are Subjects Residents are Actors Towns are Actors AND Subjects Nations are Actors AND Subjects To explain it more broadly, any entity which represents a part of the world is a Subject. Any entity which represents a player ( or a group of players ) is an Actor. Any entity which represents both is both a Subject, and an Actor. Let's go back to our initial case: Now, because of our rework, we've made it so the mayor can permit Town B ( instead of each of Town B's residents independently ) to build upon Plot C. If a resident leaves Town B, then by definition they are no longer a part of Town B, and would therefore have no permission to change Plot C anymore. This system, as you can guess I hope, also extends to Nations. You can imagine I'm sure many different situations where this would come in useful.

About Us

A’therys Horizons is an upcoming Minecraft Modded RPG Server, a world truly unique with many experiences for Roleplayers, Pvpers, Builders & Merchants alike.

Useful Links

Keep up to date!


Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy