Instead of having a message of "You are banned" when Player->isBanned(), why not use the message recorded in the ban? This would help players be less confused with what they did wrong.
Note that this may lead to unintended information exposure. Current users may expect banned players to be unable to see this message.
Closed due to undesired side effects. This feature should be implemented by plugins if intended.
Generally, ban systems have a "public reason" (everyone can see), a "personal reason" (only banned player and staff can see) and an "internal reason" (only staff can see). You may want to develop a plugin that separates these messages.
There is already a reason in it though. It would be nice for an option to show it, and then default to "You are banned" if they leave it out. I don't think this is hard to do, and I'm probably just going to make a listener to get this done, but I think more people may like this as an option. It's kind of a waste of the entire "reason" in the code if there is no option to allow the player to see it.
A better mechanism would be to implement separate messages for the player and the staff. However this will be too complicated for the core, and it should be done via a plugin.
The core is supposed to implement a minimal security ("security" seriously?) mechanism for the server. More advanced features shall be implemented by plugins rather than overloading the core with bloatware.
It is not the question whether there can be the option to display it to the user. It is the question whether that message is supposed to be displayed to the user.
Is an option to show the reason they got banned really bloatware though? It seems more like basic functionality that is lacking because someone decided for everyone else that no one would ever want to display the reason the player got banned. The idea of having two types of reasons however, is over done and "bloated". The player should know what the staff member feels they did wrong, there is no need for multiple reasons in a vast majority of situations. I'm simply asking for options, I've tried multiple ways to cancel this but it's not working out and I'd prefer not to have to cut the line out of pocketmine every time I update my server.
Edit: It makes even less sense to have it say "You are banned" instead of the reason because when you pick a player it shows the reason. 馃槙
The problem now is that we have already assumed that people want to keep it private, and people have already created data according to this rule. It is impossible to safely change this without creating an extra option. But if we do so for something so small, pocketmine.yml will be quickly bloated with all kinds of pointless options that probably nobody ever wants to read.
The idea of having two types of messages is indeed bloated, and it is having two types of messages if there.is an option.
As I have mentioned, the ban functionality in PocketMine is very basic. PocketMine should not do too much itself. If you want better banning, make a plugin for it.
I just noticed that it is not only visible to the banned user, but also visible to everyone. Banning doesn't involve authentication, so everyone can login with your name and see your ban message. I think some servers consider the ban message to be confidential to the banned player, so this is a bigger problem than I previously mentioned. (Other players will see it too)
I'm asking for it to be an option. You don't have to force it on people if you're worried. It's functionality that should be there yet isn't. It's a simple boolean; if true -> display ban reason.
The problem is that pocketmine.yml is too bloated. This is a very minor thing, and if we add small things like this into pocketmine.yml, we have to add many other minor configurations like "no death drops" "no fall damage" etc. into there. But these are supposed to be plugins.
We have been thinking about replacing pocketmine.yml with something more systematic. Maybe we can consider this again when that happens.
I think that it's ignorant to compare this to those. Those can be changed with a listener. This can't be because it's hard coded in... try for yourself, I've tried via the packet receive and prelogin events.
This should be the default, I'm only asking it to be an option because you're worried about it.
Then create an issue for adding the API to change the banned kick message should be created, not for an option to change the ban message by adding more junk into pocketmine.yml
This should be the default, I'm only asking it to be an option because you're worried about it.
Citation needed.