2011-03-19 22:39:51 +00:00
|
|
|
package com.earth2me.essentials.chat;
|
|
|
|
|
|
|
|
import com.earth2me.essentials.Essentials;
|
2011-05-10 19:57:59 +00:00
|
|
|
import com.earth2me.essentials.Util;
|
2011-03-19 22:39:51 +00:00
|
|
|
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.PluginManager;
|
|
|
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
|
|
|
|
|
|
|
|
|
|
public class EssentialsChat extends JavaPlugin
|
|
|
|
{
|
2011-06-06 22:24:39 +00:00
|
|
|
private static final Logger LOGGER = Logger.getLogger("Minecraft");
|
2011-03-19 22:39:51 +00:00
|
|
|
|
|
|
|
public void onEnable()
|
|
|
|
{
|
2011-06-06 22:24:39 +00:00
|
|
|
final PluginManager pluginManager = getServer().getPluginManager();
|
2011-07-02 22:34:49 +00:00
|
|
|
|
|
|
|
EssentialsChatPlayerListener.checkFactions(pluginManager);
|
|
|
|
|
2011-06-06 22:24:39 +00:00
|
|
|
final EssentialsChatPlayerListener playerListener = new EssentialsChatPlayerListener(getServer());
|
|
|
|
pluginManager.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Lowest, this);
|
|
|
|
pluginManager.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.Highest, this);
|
|
|
|
if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion()))
|
|
|
|
{
|
|
|
|
LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
|
2011-03-19 22:39:51 +00:00
|
|
|
}
|
2011-06-06 22:24:39 +00:00
|
|
|
LOGGER.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
|
2011-03-19 22:39:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void onDisable()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|