DevLeoko / AdvancedBan

AdvancedBan is a Spigot plugin to manage punishments on single servers and server networks
GNU General Public License v3.0
164 stars 130 forks source link

How can I change the "Console" #526

Closed ghost closed 2 years ago

ghost commented 3 years ago

What version of AdvancedBan (/AdvancedBan) are you using? 2.3.0

What kind of server do you have (Bungeecord/single server)? Single

What server version (/version) are you using? 1.8.8

Please provide the EXACT steps required to reproduce the problem... "You have been banned by %OPERATOR%" (Instead of OPERATOR, the person who gives the punishment writes). It says "You have been banned by Console" when someone automatically bans.

How can I change the "Console"?

Hopefuls commented 3 years ago

This is not possible with the current AdvancedBan version without modifying the source code, though if you wish to go that length, take a look at this line https://github.com/DevLeoko/AdvancedBan/blob/5c7257736a8f64363dfb33aa171d023117ec4fdc/core/src/main/java/me/leoko/advancedban/utils/commands/PunishmentProcessor.java#L72

This is the Name from the corresponding CommandSender, if this is a player, the players name will be used, if the CommandSender is the console, the String CONSOLE will be used.

In order to change this to whatever you want, you will have to check first if the CommandSender is a player or the console, then have the string change accordingly.