Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiered control #5

Open
mbax opened this issue Feb 15, 2016 · 8 comments
Open

Tiered control #5

mbax opened this issue Feb 15, 2016 · 8 comments

Comments

@mbax
Copy link
Member

mbax commented Feb 15, 2016

Some thoughts:

<mbaxter>       One of the occasional feature requests I never got around to implementing with VanishNoPacket was a tiered system.
<mbaxter>       Let, say, the server owner see invisible staff, but staff can't see the owner (perhaps toggled)
<mbaxter>       Or even more tiers than that.
<mbaxter>       I'd like to investigate that concept for my Sponge port.
<mbaxter>       But, I have no idea how I'd implement it without creating my own grouping system or doing some nasty thing with perm nodes...
<mbaxter>       Thought: System defining perm nodes and parent/child status of those nodes?
<mbaxter>       So you could customize it to existing nodes? If they can ban players, they can see other invisible folks, if they can kick players they can not see those who can also ban?
<mbaxter>       Just throwing out thoughts in the hope someone will see this and have their own thoughts on it
<CaptainBern>   hmmm
<CaptainBern>   that seems complex
<lol768>        My concern is that it seems to make use of the node system for something it's not really suited for
<lol768>        and I know we'd be storing parent/child/arc information separately
<CaptainBern>   it's hard to come up with an alternative tho
<mbaxter>       Mmmhmm
<mbaxter>       thus my struggle! :3
<AdamQpzm>      I don't know how permission work on Sponge, but couldn't you just have it like "vanish.tier.number"?
<mbaxter>       For an infinite number of tiers...
<CaptainBern>   I would work with some kind of flag system
<AdamQpzm>      I don't see the problem, mbaxter
<CaptainBern>   I think he means that if you do it that way, there's a limit with the tiers
<AdamQpzm>      If someone has enough tiers to go past that limit they probably have a different sort of problem
<CaptainBern>   Doesn't Sponge provide a way to set metadata for players that perists through reboots?
<mbaxter>       AdamQpzm: What would you set for a tier count?
<mbaxter>       Or make it configurable
<mbaxter>       Because every time you check a player you have to query each of those tiers.
<AdamQpzm>      I would just get all their permissions and just check through that list for their tier
<CaptainBern>   that seems so uglyyy
<mbaxter>       Mmmhmm
@gabizou
Copy link

gabizou commented Feb 15, 2016

Couldn't permission Contexts help you with this? @zml2008 pinging for advice.

@MoeBoy76
Copy link

You could check an OptionSubject for a numerical option such as "vanishTier"?
That's what i do in my /staff command to display which online players have the option "staff": 1".

@mbax
Copy link
Member Author

mbax commented Feb 15, 2016

@gabizou suggested a directed graph approach, which seems rather fun.

@mbax
Copy link
Member Author

mbax commented Feb 24, 2016

kittens:
  permission: kittens.in.mittens
cats:
  permission: older.kittens
puppies:
  permission: puppypuppy.puppy
  cansee: kittens
axolotls:
  permission: wtf.nature
  cansee: [puppies,cats]

@meyerzinn
Copy link

@mbax What's the object oriented way of getting rich? Inheritance. I assume axolotls can see kittens then. Looks like a generic tree structure. Would you need a particular data type, or could you use something from Guava?

@mbax
Copy link
Member Author

mbax commented Feb 24, 2016

If Guava has something you can point me at, that'd be neat.

@meyerzinn
Copy link

@mbax Haven't used it too specifically but wouldn't this just be a node system? You could traverse it to find the correct properties. Looking for a data storage to match this.

Say, for example, I have permission node A and B, where B inherits A. Getting object A would give you the parents of A, but getting B would give you the parents of B (including A).

https://github.com/PEXPlugins/PermissionsEx/blob/master/permissionsex-core/src/main/java/ninja/leaping/permissionsex/rank/FixedRankLadder.java is how PEX does it.

@meyerzinn
Copy link

Well, I thought of something, but I now realize Vanish has nothing to do with Packets. How would you enforce the visibility policy if you just use Invisibility keys? Is there some contextual thing for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants