-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to GeoIP2, add db update and locale options. #1748
Conversation
add option to update GeoIP2 db files add option to show geolocation with locale
This brings |
downgrade jackson-databind to 2.7.9.2 just to lose 200k more.
Well 1.6mb is the best I could do so far. I think the other way out is to rewrite the GeoIP2 API by hand, but it is definitely going to be as pain as hell. Let me know if you have any more idea. |
EssentialsGeoIP/pom.xml
Outdated
@@ -26,14 +26,57 @@ | |||
|
|||
<dependencies> | |||
<dependency> | |||
<groupId>net.ess3</groupId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You removed essentials from the dependencies. Breaks this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some how, with this dependency, maven includes the whole ess into GeoIP.jar. To be honest I'm not sure how to do it properly. At least it doesn't cause problem when I tested it :P
Ok I think I have a proper solution now. Trying to use |
Sweet. Thank you for your work on this ❤️ |
try to eliminate unused class on dependencies.
I think that's it. 1.1Mb is the best I could make. ( P.S. There is an interesting maven plugin called |
Nice. I'll take a look at this soon. Lets see if we can get @SupaHam to approve :) |
Please remove javatar dependency and autotest.sh. I'll need to test this later to make sure it works fine. |
Thank you very much for reaching out to us before the breakages happened. The reason I wanted javatar removed is because of jar footprint, we need to make sure we're not adding things needlessly without considering better alternatives. |
Fix #1745 #1746
Since MaxMind is going to drop support on Legacy GeoIP db files, I decided to upgrade EssentialsGeoIP to work with the newer and more featured GeoIP2 API.
The change of this PR include:
Some minor changes include:
Changes that I have thought of but did not included:
GeoIP2 API now support several exception messages, including the "must have"
AddressNotFoundException
(see EssentialsGeoIPPlayerListener.jar line 97 to 106). It should be a good idea to add some custom messages when such a exception is caught. Yet I'm not sure if it is a good idea to do so since I could only handle English and Chinese (CN, HK and TW).If you think there are option(s) I have added are unnecessary, please contact me and I will remove them removed for you.