mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-25 16:09:44 +00:00
[trunk] Protect, move some bits about
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1582 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
541fc51780
commit
a005436510
1 changed files with 5 additions and 8 deletions
|
@ -10,8 +10,6 @@ import com.earth2me.essentials.protect.data.ProtectedBlockMemory;
|
||||||
import com.earth2me.essentials.protect.data.ProtectedBlockMySQL;
|
import com.earth2me.essentials.protect.data.ProtectedBlockMySQL;
|
||||||
import com.earth2me.essentials.protect.data.ProtectedBlockSQLite;
|
import com.earth2me.essentials.protect.data.ProtectedBlockSQLite;
|
||||||
import java.beans.PropertyVetoException;
|
import java.beans.PropertyVetoException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
@ -53,10 +51,10 @@ public class EssentialsProtect extends JavaPlugin implements IConf
|
||||||
public void onEnable()
|
public void onEnable()
|
||||||
{
|
{
|
||||||
|
|
||||||
PluginManager pm = this.getServer().getPluginManager();
|
|
||||||
ess = Essentials.getStatic();
|
ess = Essentials.getStatic();
|
||||||
ess.getDependancyChecker().checkProtectDependancies();
|
ess.getDependancyChecker().checkProtectDependancies();
|
||||||
|
PluginManager pm = this.getServer().getPluginManager();
|
||||||
playerListener = new EssentialsProtectPlayerListener(this);
|
playerListener = new EssentialsProtectPlayerListener(this);
|
||||||
blockListener = new EssentialsProtectBlockListener(this);
|
blockListener = new EssentialsProtectBlockListener(this);
|
||||||
entityListener = new EssentialsProtectEntityListener(this);
|
entityListener = new EssentialsProtectEntityListener(this);
|
||||||
|
@ -73,12 +71,11 @@ public class EssentialsProtect extends JavaPlugin implements IConf
|
||||||
pm.registerEvent(Type.LIGHTNING_STRIKE, weatherListener, Priority.Highest, this);
|
pm.registerEvent(Type.LIGHTNING_STRIKE, weatherListener, Priority.Highest, this);
|
||||||
pm.registerEvent(Type.THUNDER_CHANGE, weatherListener, Priority.Highest, this);
|
pm.registerEvent(Type.THUNDER_CHANGE, weatherListener, Priority.Highest, this);
|
||||||
pm.registerEvent(Type.WEATHER_CHANGE, weatherListener, Priority.Highest, this);
|
pm.registerEvent(Type.WEATHER_CHANGE, weatherListener, Priority.Highest, this);
|
||||||
|
reloadConfig();
|
||||||
|
ess.addReloadListener(this);
|
||||||
if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion()))
|
if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion()))
|
||||||
{
|
{
|
||||||
logger.log(Level.WARNING, "Version mismatch! Please update all Essentials jars to the same version.");
|
logger.log(Level.WARNING, Util.i18n("versionMismatchAll"));
|
||||||
reloadConfig();
|
|
||||||
Essentials.getStatic().addReloadListener(this);
|
|
||||||
}
|
}
|
||||||
logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
|
logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue