MaxBans
Support Spigot from 1.7.x to 1.12.x
MaxBans is a project I've been writing for my server, MaxGamer. I struggled to find a banning plugin that wasn't a joke, and the good plugins were all designed for Premium servers anyway. Nothing gave us the tools that SHOULD have been out there - Like temp mutes, temp IP bans, duplicate IP lookups, and good autocompletion!
It is thoroughly tested on an Offline-Mode server, so you can bet it's rock solid and feather light!
Databases
- MySQL
- SQLite (Flatfile)
Best Features
Here are the top ten features of MaxBans over other banning plugins:
- Full UUID support
- Ability to view players' previous username(s) - date of change
- Full server lockdown - Prevent anyone from joining with a custom message (Such as bot attacks)
- Offline player name auto completion
- Warnings system
- Duplicate IP detection
- DNSBL lookups to stop proxys!
- Multiline kick messages! No more running off the screen!
- Notifications when a banned player tries to join!
- All times are relative! (Eg. "You're banned for 4 minutes 6 seconds", not "You're banned til 5:43pm CST")
- Customize every colour!
- Block commands like /me when muted!
Commands
- /unban <name, IP or UUID>
- /ban <name, IP or UUID> <reason>
- /ipban <name, IP or UUID> <reason>
- /tempban <name, IP or UUID> <number> <minutes|hours|days|weeks|etc> <reason>
- /tempipban <name, IP or UUID> <number> <minutes|hours|days|weeks|etc> <reason>
- /mute <name or UUID>
- /tempmute <name or UUID> <number> <minutes|hours|days|weeks|etc>
- /kick <name, * for everyone or UUID>
- /checkip <name or UUID>
- /uuid
- /togglechat
- /dupeip <name, IP or UUID>
- /checkban <name, IP or UUID>
- /warn <name or UUID> <reason>
- /clearwarnings <name or UUID> <reason>
- /unwarn <name or UUID> - Removes a players most recent warning
- /unmute <name or UUID>
- /history [name] [number of records] - Displays a history of bans, kicks, mutes & more dealt
- /mbreload - Reloads the plugin
- /mbdebug - Outputs debug information for me if you're having issues!
- /mbwhitelist <name or UUID> - Allows the given user to bypass IP bans (Not regular bans! Eg, use for players with siblings who need to be IP banned)
- /ipreport - Basically, a mass /dupeip, on everyone who is online
- /lockdown [reason]
- /forcespawn - Teleports someone to the spawn (Twice, so /back won't work)
- /mbreload - Reloads maxbans
- /mbimport - Imports vanilla minecraft (And others) bans.
- /mbexport - Export bans to vanilla, MySQL or SQLite databases. (Allows swapping SQLite <-> MySQL), and others ban plugins.
- /rangeban <ip1-ip2> [reason] - Bans the IP range from ip1 to ip2 for the supplied reason.
- /temprangeban <ip1-ip2> <time> <hours/min/sec> [reason] - Temporary variant of above
- /unrangeban <ip> - Removes any RangeBan which overlaps with the given IP. Eg, if 127.0.0.1-127.0.0.5 is banned, unbanning 127.0.0.3 will lift the whole ban on 127.0.0.1-127.0.0.5.
Almost any command may have -s added in it to prevent announcing it, for example:
/tempban NewGuy101 -s 1 hour MaxBans is Awesome!
- Nobody will see the announcement that NewGuy101 was temp banned, just the fact he "has left the game."
If you want an in-depth analysis of each command, try here:
http://dev.bukkit.org/server-mods/maxbans/pages/command-tutorial/
Configuration Guide
http://dev.bukkit.org/server-mods/maxbans/pages/config-tutorial/
This is an in-depth guide on how to configure MaxBans :) If I've missed anything, ask in the comments!
Common Issues
http://dev.bukkit.org/server-mods/maxbans/pages/common-issues/
This is a list of common issues people have with MaxBans, such as plugin conflicts.
Features that will never implement
- Fines (Use your economy to do this!)
- Jails
- Regional bans
- Ban weightings
Ban Listing Webpage
Check out this guy's work for an amazing webpage setup to view MaxBans while using MySQL.
Demo (dont download from here): http://yive.me/maxbans/.
Its updated and is working on latest version of MaxBans!
You can download the updated version from here: https://github.com/FabioZumbi12/maxbans-php
- Added pagination;
- Fixed other ban pages not loading;
Metrics
This plugin uses Hidendra's plugin metrics system (http://mcstats.org/plugin/maxbans) which tracks server information including:
- A unique ID
- Java version
- Online/Offline mode
- Plugin & Server version
- OS name, version, architecture
- Number of CPU cores
- Players online
- Metrics version
These stats can be disabled using the PluginMetrics config file (BukkitServer/plugins/PluginMetrics/config.yml).
GeoIP Lookup
MaxBans will download a GeoIP.csv file, which allows it to look up the country of origin for IP addresses. The file is downloaded directly from maxmind GeopIP site. The file is only downloaded once (Unless it is renamed/removed).
FabioZumbi12:
Hello all. I am other dev and now i assuming the Project for bugfixes and possible improvements.
Netherfoam still busy but still online on comunity. I have a lot of time to code (i have a home work) and i can maintain this plugin (and my others) Always updated ;)
See ya o/
This plugin is looking great. Thanks for your work! Could I make a suggestion? I would love to have a feature where you can see the most recent bans/mutes/etc../etc.. done by whom to whom. It would be good to see the lowdown of what happened when an owner of a bigger server comes online after having a bit of a hiatus.
Okay, in v1.1, there will be:
Command: /checkban
Permission: maxbans.checkban.self
Output: Exactly the same as /checkban <Your Username>, except doesn't require maxbans.checkban permission.
And kick message colours (They're all white by default still, personally, I think any colour other than white looks messy without a custom font)
Woah, I didn't realise anyone was commenting, sorry guys - I'll subscribe to my own comments now ;)
@jbanto
Okay so. Check own warnings: https://github.com/netherfoam/MaxBans/issues/1
Deleting individual warnings, not sure if this is necessarily worth the effort with /clearwarnings, and how I've written my warning system.
Coloured messages for kicks, etc I can do something like that in the future: https://github.com/netherfoam/MaxBans/issues/2
Specifics: Yes, I've clarified it to "...No IP ban, ban or mute records for..." in v1.1 :)
@arriej
I'm not sure, what is "honeypot"? - And why would warnings need to be disabled? Wouldn't you just use the other plugins command? :S The rest I've addressed above :)
@badda2k
Glad to hear it! :D
@XtenDvas
I'll have to remember that one...
@flong55
Does an error come up when you boot the server at all?.. and it seems like you resolved it in your next comment :P
@flong55
The time is millisecond time, I think PHP is based on second time. So just divide by 1,000... e.g.
I'm guessing the timezone is in the past because the value is out of range for php integers or something.. But try it and see!
@flong55
$time = substr($row['time'],0,10);
$time = date("F j Y, g:i A", $time);
I've noticed something weird about this plugin, if I write a php script that takes all the info from mysql so I can see the bans on my website the time will be all crazy. For example I banned someone just today and it says that he got banned April 15 2003, 7:59 PM, like wtf? If you're wondering, this is my code:
<!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Banlist</title> </head> <body> <h1>Banlist</h1> <?php
date_default_timezone_set("GMT"); http://php.net/manual/en/timezones.php
$host = "....."; $user = "......"; $password = "......."; $name = "......";
$link = @mysqli_connect($host, $user, $password, $name);
if ($link) { $result = mysqli_query($link, "SELECT * FROM `bans` ORDER BY `name` DESC");
echo <<<END <table width=100% border=1 cellpadding=3 cellspacing=0> <tr style="font-weight: bold"> <td>Name</td> <td>Reason</td> <td>Admin/Mod</td> <td>Time</td> <td>Expires</td> </tr> END;
while ($row = mysqli_fetch_assoc($result)) {
echo "<tr bgcolor=#FFFFFF>";
echo <<<END <td>{$row['name']}</td> <td>{$row['reason']}</td> <td>{$row['banner']}</td> END;
echo "<td>", date("F j Y, g:i A", $row['time']), "</td>";
echo ($row['expires'] == "0") ? "<td>Never</td>" : "<td>" . date("F j Y, g:i A", $row['expires']) . "</td>" , "</tr>";
}
echo "</table>";
} else { echo "Error on MySQL Connection! <br />"; } ?> </div> </body> </html>
I can't find anything wrong with this code so I assume it has something to do with the plugin?
@sollap2
Well I figured that out before but it doesn't work anyway
Mysql works just fine, just confusing :D
"Name" is actually "Database"...
Thanks for the plugin, i've been looking for a working ban plugin for 3 god-damn days! :D
The mysql doesn't seem to work, whenever I ban someone it doesn't come up in the mysql, there isn't even a table. Is there any way to fix this?
@badda2k CommandBook/config.yml
low-priority-command-registration: true
This option solves that problem for me.
It seems that commandbook is causing conflicts with this and several other ban plugins. This plugin is working find with essentials ^_^ Anyway, epic plugin! As long as this is updated, I think I'll be sticking with this one :)
I'm getting this error (I'm running bukkit 1.4.6 R0.3 and maxbanx 0.9): java.lang.NullPointerException at org.maxgamer.maxbans.MaxBans.registerCommands(Unknown Source) at org.maxgamer.maxbans.MaxBans.onEnable(Unknown Source) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoade .java:457) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManag r.java:381) at org.bukkit.craftbukkit.v1_4_6.CraftServer.loadPlugin(CraftServer.jav :282) at org.bukkit.craftbukkit.v1_4_6.CraftServer.enablePlugins(CraftServer. ava:264) at net.minecraft.server.v1_4_6.MinecraftServer.j(MinecraftServer.java:3 1) at net.minecraft.server.v1_4_6.MinecraftServer.e(MinecraftServer.java:3 0) at net.minecraft.server.v1_4_6.MinecraftServer.a(MinecraftServer.java:2 9) at net.minecraft.server.v1_4_6.DedicatedServer.init(DedicatedServer.jav :149) at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java 399) at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:8 9)
Can you add ban,tempban,ipban and mute exempt? and an option to edit warnings, As listed down here, a player types /warnings and that will show them the warnings they have. or an option to disable the warning system (like i am now using an other warning system)
and maybe add honeypot support and make a ban reason for it if that is possible.
if you would like i will add a ticket. but i like that this plugin overrides essentials
Greatwork, Thanks
excellent, seems to work fine.
Suggestions: a way to inform a player if they have been warned while offline, a way for players to check their own warnings(giving checkban permission lets them check everyones), a way to delete individual warnings instead of clearing all of them at once, colored messages for lockdowns bans kicks, etc would be nice if possible
Issues: if a user only has warnings and no bans doing checkban will display the warnings correctly but also say there are no records for them, I could see this being an intended feature but it might be confusing for some