mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-13 10:04:51 +02:00
Removing server layer part 2
This commit is contained in:
@@ -3,6 +3,7 @@ package net.ess3.geoip;
|
||||
import static net.ess3.I18n._;
|
||||
import net.ess3.api.IEssentials;
|
||||
import java.util.logging.Level;
|
||||
import net.ess3.api.IPlugin;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
@@ -13,12 +14,13 @@ public class EssentialsGeoIP extends JavaPlugin
|
||||
public void onEnable()
|
||||
{
|
||||
final PluginManager pm = getServer().getPluginManager();
|
||||
final IEssentials ess = (IEssentials)pm.getPlugin("Essentials-3");
|
||||
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
|
||||
final IPlugin plugin = (IPlugin)pm.getPlugin("Essentials-3");
|
||||
final IEssentials ess = (IEssentials)plugin.getEssentials();
|
||||
if (!this.getDescription().getVersion().equals(plugin.getDescription().getVersion()))
|
||||
{
|
||||
getLogger().log(Level.WARNING, _("versionMismatchAll"));
|
||||
}
|
||||
if (!ess.isEnabled())
|
||||
if (!plugin.isEnabled())
|
||||
{
|
||||
this.setEnabled(false);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user