AntiSpamKick 1.0.0.0.0

This plugin block the "disconnect.spam" kick!

  1. extremall
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    Code (Text):
    package me.extremall.antispamkick.main;
    import org.bukkit.Bukkit;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerKickEvent;
    import org.bukkit.plugin.java.JavaPlugin;
    public class AntiSpamKick extends JavaPlugin implements Listener
    {
      @Override
      public void onEnable()
      {
        Bukkit.getPluginManager().registerEvents(this, this);
      }
      @EventHandler
      public void onPlayerKick(PlayerKickEvent event)
      {
        if (event.getReason().equals("disconnect.spam"))
        {
          event.setCancelled(true);
        }
      }
    }
    XxTreme_Creeper_ likes this.