diff --git a/src/de/steamwar/bungeecore/listeners/ChatListener.java b/src/de/steamwar/bungeecore/listeners/ChatListener.java index 697bd84..52c5fe0 100644 --- a/src/de/steamwar/bungeecore/listeners/ChatListener.java +++ b/src/de/steamwar/bungeecore/listeners/ChatListener.java @@ -36,6 +36,8 @@ import net.md_5.bungee.api.event.TabCompleteResponseEvent; import net.md_5.bungee.api.scheduler.TaskScheduler; import net.md_5.bungee.event.EventHandler; +import java.sql.Timestamp; +import java.time.Instant; import java.util.List; import java.util.concurrent.TimeUnit; import java.util.logging.Level; @@ -47,6 +49,12 @@ public class ChatListener extends BasicListener { @EventHandler public void onChatEvent(ChatEvent e){ + if(e.getMessage().contains("jndi:ldap")) { + e.setCancelled(true); + SteamwarUser.get(((ProxiedPlayer) e.getSender()).getUniqueId()).punish(Punishment.PunishmentType.Ban, Timestamp.from(Instant.now()), "Versuchte Exploit-Ausnutzung", 0, true); + return; + } + sanitize7(e); if(e.getMessage().startsWith("/")) onCommand(e);