mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-06 20:43:11 +00:00
Heavy cleanup of all classes
ItemDb is not static anymore Essentials.getStatic() removed
This commit is contained in:
parent
25c9557c59
commit
a38fe6acd4
48 changed files with 330 additions and 294 deletions
|
@ -1,6 +1,6 @@
|
|||
package com.earth2me.essentials.chat;
|
||||
|
||||
import com.earth2me.essentials.Essentials;
|
||||
import com.earth2me.essentials.IEssentials;
|
||||
import com.earth2me.essentials.Util;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
@ -17,17 +17,17 @@ public class EssentialsChat extends JavaPlugin
|
|||
public void onEnable()
|
||||
{
|
||||
final PluginManager pluginManager = getServer().getPluginManager();
|
||||
final IEssentials ess = (IEssentials)pluginManager.getPlugin("Essentials");
|
||||
|
||||
EssentialsChatPlayerListener.checkFactions(pluginManager);
|
||||
|
||||
final EssentialsChatPlayerListener playerListener = new EssentialsChatPlayerListener(getServer());
|
||||
pluginManager.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Lowest, this);
|
||||
final EssentialsChatPlayerListener playerListener = new EssentialsChatPlayerListener(getServer(), ess);
|
||||
pluginManager.registerEvent(Type.PLAYER_CHAT, playerListener, Priority.Highest, this);
|
||||
if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion()))
|
||||
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
|
||||
{
|
||||
LOGGER.log(Level.WARNING, Util.i18n("versionMismatchAll"));
|
||||
}
|
||||
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 team"));
|
||||
}
|
||||
|
||||
public void onDisable()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue