I need a small plugin that Bans someone if they get kicked for flying. My server doesn't have any anti-hacks or whatever. I just use the default fly kick. So someone can fly for like 10 seconds and then they get kicked. I would like a very small plugin that when someone gets kicked for flying they get banned for X minutes. No commands needed. Just need a config file where you can change the X minutes ban. Permissions are usefull aswell: So if I add - flyban for my Admin group they won't get banned for the kick. If you can't make that it doesn't matter. They will have to live with the few minutes ban.
@si7vder This could create some problems though because whenever the server stops responding or if you have a plugin that sets a player's velocity, they often get kicked because the server thinks they are flying. This actually does happen pretty often, so I don't think this is a good idea.
I know sometimes people get kicked for flying because they aren't actually flying. However that happens once in 2 weeks and they will have to live with a few minutes time-out. If anyone can make it I'll appreciate your help and don't worry of what might happen or what can go wrong, my server is not like other servers and I am not trying to replace NoCheatPlus. It's more like having a time-out for X minutes because of flying (I already got some other time-out features that will ban people for X minutes if they do certain things).
We don't recommend banning for flying usually, because it can't always be excluded that there are no false positives and because survivalfly violations include hover+speeding+flying. There can be false positives, e.g. for hover, if the block shapes are reported differently than usually (can change with Minecraft versions) or if NCP is outdated, or even worse, if you have a player trying to get onto a lily pad that has been removed server side but not client side (we observed that on 1.8, though i am not too sure if you can reach higher total VL values with that), chunks not loading at the players position on join/teleport can also be a problem. There also is some unvertainty always, because the client only sends moves based on a timer, so we have to guess some things, which leaves some potential for false positives (usually not that big, but there have been rare cases of escalation). So given how Minecraft and server mods used to work, we really don't recommend auto-banning for flying without observing them fly. If you want to ban anyway, ensure to not ban too quickly (e.g. with hover violations). Certainly we will improve detection and add the ability to distinguish types of violations at some point (survivalfly VL is too coarse and doesn't really reflect what happens).
Bump. Like I said and will say again: it doesn't matter if people get banned since it's not a perma ban and only a "time-out" for several minutes. Like I said, I won't use NCP. My server isn't like others and I don't care if someone gets banned by this plugin for "hovering" or however you can call it.
Oh, forgot about that. Sec. https://www.dropbox.com/s/hngfar3lvfxvx37/Antifly.jar?dl=0 Not tested. I just did what seemed would work. Permissions: Get notifications of bans (logs to console anyway): antifly.notify Exempt a player from getting whacked by the hammer: antifly.exempt (OP default) CAVEAT: There may be an issue where the plugin bans people because it thinks the lag delay + movement = flying. I strongly recommend not using this plugin. If you would like the warn+kick only version, ask me. The flags the plugin checks for is: - Does ply have creative? - Does ply have fly enabled? (fly: on over flying ;; off and flying anyway) - Is the player OP? - Does the player have permission "antifly.exempt"? See here for the check code (basically the whole plugin) (Move your mouse to reveal the content) See here for the check code (basically the whole plugin) (open) See here for the check code (basically the whole plugin) (close) See here for the check code (basically the whole plugin) (Move your mouse to reveal the content) See here for the check code (basically the whole plugin) (open) See here for the check code (basically the whole plugin) (close) See here for the check code (basically the whole plugin) (Move your mouse to reveal the content) See here for the check code (basically the whole plugin) (open) See here for the check code (basically the whole plugin) (close) Code: public void onMove(PlayerMoveEvent e) { Player p = (Player) e.getPlayer(); if(p.isFlying()) { if(p.isOp() || p.hasPermission("antifly.exempt") || p.getAllowFlight() || p.getGameMode() == GameMode.CREATIVE) { } else { for(Player z : Bukkit.getServer().getOnlinePlayers()) { if(z.getPlayer() != p.getPlayer()) { if(z.hasPermission("antifly.notice")) { z.sendMessage(ChatColor.RED + "[WARNING] " + p.getName() + " attempted to fly and was banned."); } } } Bukkit.getServer().getLogger().warning("AF-------------------------------------------------"); Bukkit.getServer().getLogger().warning(p.getName() + " attempted to fly and was banned."); Bukkit.getServer().getLogger().warning("AF-------------------------------------------------"); e.setCancelled(true); p.kickPlayer(ChatColor.DARK_RED + "BANNED!\n" + ChatColor.RED + "Banned for Flying"); p.setBanned(true); } } } Edited 1/22/15 EDIT by Timtower: merged posts
Precisely why I didn't want to make it ban-on-pass type of plugin. I opted in to make the "kick and alert" only version.