1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-29 23:59:06 +02:00
Files
Essentials/EssentialsProtect/src/net/ess3/protect/EssentialsConnect.java
2012-10-06 17:02:58 +02:00

32 lines
847 B
Java

package net.ess3.protect;
import java.util.logging.Level;
import java.util.logging.Logger;
import static net.ess3.I18n._;
import net.ess3.api.IEssentials;
import net.ess3.bukkit.BukkitPlugin;
import org.bukkit.plugin.Plugin;
public class EssentialsConnect
{
private static final Logger LOGGER = Logger.getLogger("Minecraft");
private final transient IEssentials ess;
private final transient IProtect protect;
public EssentialsConnect(final Plugin essPlugin, final Plugin essProtect)
{
if (!essProtect.getDescription().getVersion().equals(essPlugin.getDescription().getVersion()))
{
LOGGER.log(Level.WARNING, _("versionMismatchAll"));
}
ess = ((BukkitPlugin)essPlugin).getEssentials();
protect = (IProtect)essProtect;
protect.setSettings(new ProtectHolder(ess));
}
public IEssentials getEssentials()
{
return ess;
}
}