Calendar calendar = Calendar.getInstance(); SimpleDateFormat timeFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm"); String hoverText = PlaceholderAPI.setPlaceholders(p, this.plugin.getMessage("messages.chatHover") .replaceAll("%time%", timeFormat.format(calendar.getTime())) .replaceAll("%player%", p.getDisplayName())); String textFormat = formatStart + me.getChatTag(you).trim() + formatEnd; TextComponent textComponent = new TextComponent(TextComponent.fromLegacyText(String.format(textFormat, new Object[]{ p.getDisplayName(), e.getMessage() }))); textComponent.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, (new ComponentBuilder(hoverText)).create())); textComponent.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + p.getName() + " "));