blob: b6697a6587f77734274e42db37707cae6c5d6ce2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package com.earth2me.essentials.geoip;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.api.IEssentials;
import java.util.logging.Level;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
public class EssentialsGeoIP extends JavaPlugin
{
public EssentialsGeoIP()
{
}
@Override
public void onDisable()
{
}
@Override
public void onEnable()
{
final PluginManager pm = getServer().getPluginManager();
final IEssentials ess = (IEssentials)pm.getPlugin("Essentials3");
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
{
getLogger().log(Level.WARNING, _("versionMismatchAll"));
}
if (!ess.isEnabled()) {
this.setEnabled(false);
return;
}
final EssentialsGeoIPPlayerListener playerListener = new EssentialsGeoIPPlayerListener(this, ess);
pm.registerEvents(playerListener, this);
ess.addReloadListener(playerListener);
getLogger().log(Level.INFO, "This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/.");
}
}
|