diff options
author | snowleo <schneeleo@gmail.com> | 2012-02-21 19:17:22 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-02-21 19:17:22 +0100 |
commit | 32840e68f361c61ea42b77d33eb67d6164c136a4 (patch) | |
tree | b819cc442d37e2080c425332bf4a014094a310b7 /EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSignsPlugin.java | |
parent | 4da3f52164f118825ace616408b4ce13571cab63 (diff) | |
download | Essentials-32840e68f361c61ea42b77d33eb67d6164c136a4.tar Essentials-32840e68f361c61ea42b77d33eb67d6164c136a4.tar.gz Essentials-32840e68f361c61ea42b77d33eb67d6164c136a4.tar.lz Essentials-32840e68f361c61ea42b77d33eb67d6164c136a4.tar.xz Essentials-32840e68f361c61ea42b77d33eb67d6164c136a4.zip |
Sign settings
Diffstat (limited to 'EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSignsPlugin.java')
-rw-r--r-- | EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSignsPlugin.java | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSignsPlugin.java b/EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSignsPlugin.java index 986624125..6f21a0f1a 100644 --- a/EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSignsPlugin.java +++ b/EssentialsSigns/src/com/earth2me/essentials/signs/EssentialsSignsPlugin.java @@ -5,16 +5,17 @@ import com.earth2me.essentials.api.IEssentials; import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.Bukkit; -import org.bukkit.event.Event; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; -public class EssentialsSignsPlugin extends JavaPlugin +public class EssentialsSignsPlugin extends JavaPlugin implements ISignsPlugin { private static final transient Logger LOGGER = Bukkit.getLogger(); private transient IEssentials ess; + private transient SignsConfigHolder config; + @Override public void onEnable() { final PluginManager pluginManager = getServer().getPluginManager(); @@ -28,35 +29,29 @@ public class EssentialsSignsPlugin extends JavaPlugin this.setEnabled(false); return; } - - final SignBlockListener signBlockListener = new SignBlockListener(ess); - pluginManager.registerEvent(Event.Type.SIGN_CHANGE, signBlockListener, Event.Priority.Highest, this); - pluginManager.registerEvent(Event.Type.BLOCK_PLACE, signBlockListener, Event.Priority.Low, this); - pluginManager.registerEvent(Event.Type.BLOCK_BREAK, signBlockListener, Event.Priority.Highest, this); - pluginManager.registerEvent(Event.Type.BLOCK_IGNITE, signBlockListener, Event.Priority.Low, this); - pluginManager.registerEvent(Event.Type.BLOCK_BURN, signBlockListener, Event.Priority.Low, this); - pluginManager.registerEvent(Event.Type.BLOCK_PISTON_EXTEND, signBlockListener, Event.Priority.Low, this); - pluginManager.registerEvent(Event.Type.BLOCK_PISTON_RETRACT, signBlockListener, Event.Priority.Low, this); - - final SignPlayerListener signPlayerListener = new SignPlayerListener(ess); - pluginManager.registerEvent(Event.Type.PLAYER_INTERACT, signPlayerListener, Event.Priority.Low, this); - - final SignEntityListener signEntityListener = new SignEntityListener(ess); - pluginManager.registerEvent(Event.Type.ENTITY_EXPLODE, signEntityListener, Event.Priority.Low, this); - pluginManager.registerEvent(Event.Type.ENDERMAN_PICKUP, signEntityListener, Event.Priority.Low, this); - //final SignBlockListener signBlockListener = new SignBlockListener(ess); + + final SignBlockListener signBlockListener = new SignBlockListener(ess, this); pluginManager.registerEvents(signBlockListener, this); - //final SignPlayerListener signPlayerListener = new SignPlayerListener(ess); + final SignPlayerListener signPlayerListener = new SignPlayerListener(ess, this); pluginManager.registerEvents(signPlayerListener, this); - //final SignEntityListener signEntityListener = new SignEntityListener(ess); + final SignEntityListener signEntityListener = new SignEntityListener(ess, this); pluginManager.registerEvents(signEntityListener, this); + config = new SignsConfigHolder(ess, this); + LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team")); } + @Override public void onDisable() { } + + @Override + public SignsConfigHolder getSettings() + { + return config; + } } |