1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-25 05:41:36 +02:00
Files
Essentials/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
2012-01-20 05:52:35 +01:00

41 lines
1.0 KiB
Java

package com.earth2me.essentials.geoip;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.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("Essentials");
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(getDataFolder(), ess);
pm.registerEvents(playerListener, this);
getLogger().log(Level.INFO, "This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/.");
}
}