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/
@netherfoam
Ahh. Yeah i see no reason to run on mysql right now. I'm also too lazy to add a user to my database for remote access.
@zSwayz
Just incase one of the connections wasn't closed properly or something :S
@netherfoam
I do not, but i plan to make one eventually. Why do you ask?
@zSwayz
Do you happen to have a webpage or something else hooking into the syncer by chance?
@zSwayz
Hmm, I will see if I can fix it. Can you possibly send me the config? It might help me to find what is going wrong with the syncer. (I've tried syncing in a dev environment and never had it freeze...)
Linking databases like that won't work because the data is cached in memory, so a full reload of the plugin would be required for the fresh data to be loaded into memory.
@netherfoam
I have disabled syncing. I will report back if i have another problem. I was planning on setting this up on multiple servers but i don't think that's a good idea if all of them are going to lock up when we restart. I may be better off symlinking databases or using sql.
@zSwayz
So, I see you have Syncing enabled (I haven't been able to do much extreme testing with it). So, how many players do you have at any one time across all the servers that are hooked up for syncing? (Or do you only have one server?)
Also, can you do /mbdebug and send me Bukkit\plugins\MaxBans\debug.txt? It has the config (Blanked passwords), version info and what your database looks like, so it'll be a fairly big text file.
Also, if you disable syncing.. does the issue still occur? And have you tried this one... https://dl.dropbox.com/u/72835893/Plugins/MaxBans.jar it fixes an issue where the database would never be unlocked if there was an error while the database was being modified.
@AlexM850
Yeah, I'm not going to implement it, I think if you're worried about staff kicking staff you should pick better staff. The other reason is (Unfortunately) most permission systems don't store a players permissions while they're offline. That means they can ban you and totally bypass the system if you're offline. Plus, say if you were hacked, none of your staff would have any power to 'defend' the server.
@AlexM850
You have console access silly! :s
@AlexM850
Features that I will NEVER implement
* Ban weightings (If your mods are kicking/banning you, they should be demoted instead)
@netherfoam
Do you plan to add permissions for players not being able to kick higher staff, ie: right now my moderators are able to kick me etc, just curious for security purposes. I'm very paranoid about these things.
@netherfoam
It happens all the time, and it was more like an hour this time. I didn't import anything.
@zSwayz
I'll mark it as an issue when I get time to... in the mean time, does it happen every time, or just when you try to import some bans?
(Though, 32 seconds isn't much?)
@netherfoam
@zSwayz
That'd do it, just give it a few minutes to do it.
@netherfoam
Over 9000!
I think like 400 or so bans.
@zSwayz
Its a limitation with SQLite. How many bans are in your vanilla bans?
@netherfoam
Running this on a dedicated server. I don't see a reason for it to freeze for that long.
@zSwayz
Okay, MaxBans isnt freezing, its saving all the changes to the database. If you do a big change like import a large set of vanilla bans.. Eg 100+ at once, it will seem to 'freeze' but actually is just trying to write all the new data to the database before it shuts down (it has to...)
Just give it some time :) Most PCs its usually 10 bans/sec that can be handled.
@netherfoam
I am using SQLite. This is the second lock on shutdown. Latest version yes. It does lock when i shutdown/startup. A few days ago i did a vanilla bans import.
Also, there is no error. It just locks up. -_-
@zSwayz
Interesting. Has this happened more than once? Was there a stacktrace or error of sorts? Are you using the latest 1.4 version? Is your MySQL server responding correctly? (Or.. is your SQLite file locked by another process.. such as a database editor?) Was there a conversion recently? Does it lock when you start it up and reboot immediately after?