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

Separate out permission/groups from CommandSender #1

Open
Zidane opened this issue Jul 10, 2014 · 2 comments
Open

Separate out permission/groups from CommandSender #1

Zidane opened this issue Jul 10, 2014 · 2 comments

Comments

@Zidane
Copy link

Zidane commented Jul 10, 2014

Been using this lib for a little bit now and have found that having a CommandSender need to provide its groups and handle its hasPermission is a little cumbersome and doesn't make sense. CommandSender simply sends a command.

At most I'd say CommandSender needs only the hasPermission and that's it.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@kitskub
Copy link

kitskub commented Jul 10, 2014

This might be better in a PermissionManager or something

@Wolf480pl
Copy link
Contributor

The thing is: if (as developer using this library) I'm handling some action that a CommandSender (or any other PermissionSubject) is trying to do, I might want to know what are his groups (eg. so that I put a group prefix in his chat message), and I don't feel like figuring out what object is responible for this so that I can ask him.

The way it is done right now, the CommandSender can easily delegate these methods to some other object, while allowing easy creation of allmighty CommandSenders (eg. ConsoleCommandSender or ScheduledJobCommandSender who have all permissions).

@lukespragg lukespragg changed the title Seperate out permission/groups from CommandSender Separate out permission/groups from CommandSender Aug 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants