1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-27 14:49:02 +02:00

EssentialsGeoIP is now officially part of Essentials

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1292 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo
2011-05-01 11:04:34 +00:00
parent 5b4514d86b
commit 1aa4cb68bb
25 changed files with 18394 additions and 237 deletions

View File

@@ -0,0 +1,45 @@
package com.earth2me.essentials.geoip;
import com.earth2me.essentials.Essentials;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.event.Event.Priority;
import org.bukkit.event.Event.Type;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
public class EssentialsGeoIP extends JavaPlugin
{
private static final Logger logger = Logger.getLogger("Minecraft");
public EssentialsGeoIP()
{
}
@Override
public void onDisable()
{
}
@Override
public void onEnable()
{
PluginManager pm = getServer().getPluginManager();
Plugin ess = pm.getPlugin("Essentials");
if (ess != null)
{
if (!pm.isPluginEnabled(ess))
{
pm.enablePlugin(ess);
}
}
EssentialsGeoIPPlayerListener playerListener = new EssentialsGeoIPPlayerListener(getDataFolder());
pm.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this);
logger.info("Loaded " + this.getDescription().getName() + " build " + this.getDescription().getVersion() + " by " + Essentials.AUTHORS);
logger.log(Level.INFO, "This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/.");
}
}