Open RiftomeR opened 6 years ago
I believe ban was a service because it is a part of minecraft. What's your first language?
russian
I'm not against the idea, but as so far a need for this service hasn't seemed to arrive, so it's hard to create user stories for the developers that would want to implement / use such a service.
I'd be interested in hearing @connorHartley 's opinion.
Perhaps represent the 'key strings' as CatalogTypes?
I've actually been thinking of making a plugin that could use something like this. The basic idea was to push messages about "bad" players to somewhere else. Something like this could be useful for that.
For me though the idea of treating everything the same seems a bit harsh. For example, chat spam and survival flying just kick you in vanilla. I think something like this could benefit from some sort of severity rating.
Using that as a base, if it was done correctly, you could have plugins that say "this player did something shady, and I don't know what to do about it". Then somewhere else all of that could be handled in one central area.
Besides that, as long as it's extendible, from my point of view it could be an interesting idea.
Maybe we can do it like this:
punishmentService.report(player, Violations.BUG_ABUSE, Confidence.LOW);
Optional with a message or some kind of meta data for logging/history purposes.
then the PunishmentService
itself has some config/rules like this:
{
"trigger" : "count > 3",
"triggerFilter": "Confidence.MEDIUM && Violations.BUG_ABUSE",
"action": "KICK_BAN(5s)"
}, ....
but this is actually all up to the plugin providing the punishment service itself.
By default/without custom punishment service all reports with confidence level of at least MEDIUM cause a kick, to address the vanilla kick reasons.
Maybe the plugins could register their reports during startup, just like the PermissionDescription, to allow easier configuration of violation keys.
punishmentService.register(Violations.BUG_ABUSE, Severity.SERVRE, SuggestedAction.REPORT/KICK/BAN, "Tries to abuse a previous bug in the application");
Maybe we can do it like this:
punishmentService.report(player, Violations.BUG_ABUSE, Confidence.LOW);
Optional with a message or some kind of meta data for logging/history purposes.
then the
PunishmentService
itself has some config/rules like this:{ "trigger" : "count > 3", "triggerFilter": "Confidence.MEDIUM && Violations.BUG_ABUSE", "action": "KICK_BAN(5s)" }, ....
but this is actually all up to the plugin providing the punishment service itself.
By default/without custom punishment service all reports with confidence level of at least MEDIUM cause a kick, to address the vanilla kick reasons.
Maybe the plugins could register their reports during startup, just like the PermissionDescription, to allow easier configuration of violation keys.
punishmentService.register(Violations.BUG_ABUSE, Severity.SERVRE, SuggestedAction.REPORT/KICK/BAN, "Tries to abuse a previous bug in the application");
Oh no! Please without static enums. I want it to be flexible.
I think it would be worth using a existing widely used plugin as a reference, eg banmanager https://github.com/BanManagement/BanManager/blob/master/common/src/main/java/me/confuser/banmanager/common/api/BmAPI.java
So, ideally, customizable reasons (Text keys for catagorys?) with explanations for each specific ban. And methods for warns/mutes/userbans/ipbans/networkban(This one would likely be implementation specific)
Punishment service will replace ban service. It will use key strings, like permission service, for example "hacks.survivalfly", "chat.spam", "admin.ban". There will be two methods: punishPlayer and unPunishPlayer in this service. They will take profile and key string as arguments. The implementation will punish or unpunish players, punishment depends on the key string. Default implementation will just ban all players, that are not ops. Sorry for my bad English.