Country Filter
Country Filter
Description
Country Filter is simple plugin for Bukkit/Spigot servers. It serves as a filter of players for your server. It filters players by their home country. You can make white-list or blacklist of countries which you'd like to allow or block.
Installation
You can simply download compiled version from releases and drop it to your plugins folder. And you're done!
Commands
- /cfilter - displays few stats and version of plugin
Known bugs
-
Some players countries are unable to be recognized due to limitation of IPv4 GeoIP data.
This problem can be solved by allowing or blacklisting country code "--".
LICENSE
This project is licensed under MIT License. More info is available in LICENSE file.
Contribution
We appreciate any contributions or big help you make with your suggestions and bug reports.
Source code
Source code is available on my GitHub page here.
@herweg
Thank you for your comment. I cant update to 1.7.X because of several reasons. But I will keep that in mind. Thank you for your Reply
@n0nnie
Hi n0nnie. Just a comment here, and trying to help. I saw in your report (log) that you are using Minecraft version 1.6 in your server. Try to update with 1.7.5 version (the server). I suggest it because I tested the plugin with 1.7.5 version and it is working properly. Well, just a sugestion. I hope it helps. Regards.
Getting this every time I stop, eload, restart my server:
Updatecheck is disabled in config:
Very useful plugin, sgcism. I downloaded version 1.0.0.2, build 4 (in your link) and tested it. The reload command is working properly now (I changed the info in the config file and after typing "ci reload" all new info is loaded). (I tested in 1.7.2 version of Minecraft, using Spigot dev. 1326, March 3). Thank you! [Sugestion: Maybe you could upload the recent and updated version here in dev.bukkit]
@herweg
Updated to 1.0.0.2 - available on my CI
Fixed reload command
Using with Spigot 1.7.2 (dev. 1244) and the plugin is working properly. Note: I downloaded (and I'm using) the development version of Country Filter (#3, available in the "CI" link with development versions available above). All is working 100% (and without errors), except the reload option (if we change something in the config file and type "ci reload" in the console a message appears showing that the plugin was reloaded, but no change is taken ; it is necessary to "stop" the server in console and later start it again, so that the changes done in the config file are considered). You had a great idea and you made a great plugin; thank you!
Look at this error (using Bukkit 1.7.2):
15:57:30 [warning] Unexpected exception while parsing console command "cf"
15:57:30 [javastacktrace] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
15:57:30 [javastacktrace] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
15:57:30 [javastacktrace] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchServerCommand(CraftServer.java:529) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
15:57:30 [javastacktrace] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:542) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
15:57:30 [javastacktrace] at net.minecraft.server.v1_7_R1.DedicatedServer.aw(DedicatedServer.java:286) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
15:57:30 [javastacktrace] at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:251) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
15:57:30 [javastacktrace] at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:541) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
15:57:30 [javastacktrace] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:453) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
15:57:30 [javastacktrace] Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
15:57:30 [javastacktrace] at ps.CF.Core.CmdExecutor.onCommand(CmdExecutor.java:22) ~[?:?]
15:57:30 [javastacktrace] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-34-g2220179-b2948jnks]
Does not filter in 1.7.2
I hope this one works with Bukkit 1.7.2.
@Limerance
It is not called "Neger Filter" but "Country Filter" ! And it can be use just for playin' in your own country without strangers which do not speek your langugae ... So let your openinon just for you !
Thats the most racist plugin i ever seen!!!
Great plugin!!! Just what I needed!
Thank you so much please keep updating if needed!
@johanadler
If you want pm me and I will send you link to our source depository.
@sgcsim
OK, thank you for the information. I did not find your source repo, so I could not check for myself.
CountryLoginMessage uses PlayerJoinEvent, according to the source.
@johanadler
It downloads own db file, but it is really small. You can find it also on http://www.maxmind.com/. And the link where you can check IP you can find above in links. And for detection it is using AsyncPlayerPreLoginEvent and I'm not sure what function is using CountryLoginMessage..
This looks interesting as a simple way to block (at least some) anonymous servers, by just filtering out 'A1'.
Will this mod, or can it, share the data downloaded by GeoIPTools, as CountryLoginMessage does, or will it create another data set?
If it does not share the data, have you considered implementing the (rather basic) functions of CountryLoginMessage?
@sgcsim
Hi. Error in the console to version 1.5.2
02.10 20:52:03 [Server] SEVERE Caused by: java.lang.NullPointerException 02.10 20:52:03 [Server] SEVERE at java.lang.Thread.run(Unknown Source) 02.10 20:52:03 [Server] SEVERE at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 02.10 20:52:03 [Server] SEVERE at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 02.10 20:52:03 [Server] SEVERE at org.bukkit.craftbukkit.v1_5_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) 02.10 20:52:03 [Server] SEVERE at org.bukkit.craftbukkit.v1_5_R3.scheduler.CraftTask.run(CraftTask.java:58) 02.10 20:52:03 [Server] SEVERE at ps.Tools.Updater.run(Updater.java:22) 02.10 20:52:03 [Server] SEVERE at ps.Tools.getText.getTextM1(getText.java:20) 02.10 20:52:03 [Server] SEVERE at java.net.URL.<init>(Unknown Source) 02.10 20:52:03 [Server] SEVERE at java.net.URL.<init>(Unknown Source) 02.10 20:52:03 [Server] SEVERE at java.net.URL.<init>(Unknown Source) 02.10 20:52:03 [Server] SEVERE java.net.MalformedURLException 02.10 20:52:03 [Server] Startup Done (1.370s)! For help, type "help" or "?" 02.10 20:52:03 [Server] INFO Server permissions file permissions.yml is empty, ignoring it 02.10 20:52:03 [Server] INFO
-------------- 02.10 20:52:03 [Server] INFO Loading of GeoIP system has been successful ... 02.10 20:52:03 [Server] INFO This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/.@sgcsim
My server is on a hosting
@DmuTpuu
And do you have your server in your local network or not ?
@sgcsim
Sure. I am from Russia and I can join the server when it is locked. No errors in the console