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);
}
}
}
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);
}
}
}
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.7, 1.8, 1.9
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
AntiSpamKick is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 751 times (via Spigot). Download it and open it directly in the game.