0

Added ban type to join message of banned player

This commit is contained in:
David Panić 2019-04-07 21:00:00 +02:00
parent 8382eb432d
commit ecc4b6d999
No known key found for this signature in database
GPG Key ID: 0FDC88FEC4D8A110

View File

@ -13,9 +13,11 @@ import net.md_5.bungee.event.EventHandler;
import net.md_5.bungee.event.EventPriority;
public class BanJoinListener<T extends Ban> implements Listener {
private String name;
private BanManager<T> bm;
public BanJoinListener(BanManager<T> bm) {
public BanJoinListener(String name, BanManager<T> bm) {
this.name = name;
this.bm = bm;
}
@ -42,7 +44,7 @@ public class BanJoinListener<T extends Ban> implements Listener {
if (ban != null) {
event.setCancelReason(
new ComponentBuilder(ChatColor.RED + "You were banned by ")
new ComponentBuilder(ChatColor.RED + "You were " + name + " banned by ")
.append(ChatColor.AQUA + ban.getSource())
.append(ChatColor.RED + " for ")
.append(ChatColor.AQUA + ban.getReason())