mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-12 09:35:26 +02:00
Fix EssentialsProtect not loading correctly, because Essentials is not loaded first.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1414 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
@@ -8,7 +8,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Event.Priority;
|
import org.bukkit.event.Event.Priority;
|
||||||
@@ -17,7 +16,7 @@ import org.bukkit.plugin.PluginManager;
|
|||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
|
||||||
public class EssentialsProtect extends JavaPlugin implements IConf
|
public class EssentialsProtect extends JavaPlugin
|
||||||
{
|
{
|
||||||
private EssentialsProtectBlockListener blockListener = null;
|
private EssentialsProtectBlockListener blockListener = null;
|
||||||
private EssentialsProtectPlayerListener playerListener = null;
|
private EssentialsProtectPlayerListener playerListener = null;
|
||||||
@@ -78,7 +77,13 @@ public class EssentialsProtect extends JavaPlugin implements IConf
|
|||||||
pm.registerEvent(Type.PLUGIN_ENABLE, serverListener, Priority.Highest, this);
|
pm.registerEvent(Type.PLUGIN_ENABLE, serverListener, Priority.Highest, this);
|
||||||
|
|
||||||
reloadConfig();
|
reloadConfig();
|
||||||
Essentials.getStatic().addReloadListener(this);
|
Essentials.getStatic().addReloadListener(new IConf() {
|
||||||
|
|
||||||
|
public void reloadConfig()
|
||||||
|
{
|
||||||
|
EssentialsProtect.this.reloadConfig();
|
||||||
|
}
|
||||||
|
});
|
||||||
if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion())) {
|
if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion())) {
|
||||||
logger.log(Level.WARNING, Util.i18n("versionMismatchAll"));
|
logger.log(Level.WARNING, Util.i18n("versionMismatchAll"));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user