diff options
author | snowleo <schneeleo@gmail.com> | 2012-08-26 20:17:29 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-08-26 20:17:29 +0200 |
commit | 50ab5ffd935ee10f0a42d7aabcce6d438cf57dcb (patch) | |
tree | e8fdbdf18aaa13d087f9bf90c5b3c29cc8f8b102 /EssentialsChat | |
parent | b98021acabcb4075c9455fd565697c69b0ba4b64 (diff) | |
download | Essentials-50ab5ffd935ee10f0a42d7aabcce6d438cf57dcb.tar Essentials-50ab5ffd935ee10f0a42d7aabcce6d438cf57dcb.tar.gz Essentials-50ab5ffd935ee10f0a42d7aabcce6d438cf57dcb.tar.lz Essentials-50ab5ffd935ee10f0a42d7aabcce6d438cf57dcb.tar.xz Essentials-50ab5ffd935ee10f0a42d7aabcce6d438cf57dcb.zip |
Removing server layer part 2
Diffstat (limited to 'EssentialsChat')
3 files changed, 7 insertions, 5 deletions
diff --git a/EssentialsChat/src/net/ess3/chat/EssentialsChat.java b/EssentialsChat/src/net/ess3/chat/EssentialsChat.java index 4c922c45f..66286a3af 100644 --- a/EssentialsChat/src/net/ess3/chat/EssentialsChat.java +++ b/EssentialsChat/src/net/ess3/chat/EssentialsChat.java @@ -9,6 +9,7 @@ import java.util.HashMap; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; +import net.ess3.api.IPlugin; import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; @@ -22,12 +23,13 @@ public class EssentialsChat extends JavaPlugin public void onEnable() { final PluginManager pluginManager = getServer().getPluginManager(); - final IEssentials ess = (IEssentials)pluginManager.getPlugin("Essentials-3"); - if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) + final IPlugin plugin = (IPlugin)pluginManager.getPlugin("Essentials-3"); + final IEssentials ess = (IEssentials)plugin.getEssentials(); + if (!this.getDescription().getVersion().equals(plugin.getDescription().getVersion())) { LOGGER.log(Level.WARNING, _("versionMismatchAll")); } - if (!ess.isEnabled()) + if (!plugin.isEnabled()) { this.setEnabled(false); return; diff --git a/EssentialsChat/src/net/ess3/chat/EssentialsChatPlayer.java b/EssentialsChat/src/net/ess3/chat/EssentialsChatPlayer.java index f3ce3abaf..4d7858c18 100644 --- a/EssentialsChat/src/net/ess3/chat/EssentialsChatPlayer.java +++ b/EssentialsChat/src/net/ess3/chat/EssentialsChatPlayer.java @@ -83,7 +83,7 @@ public abstract class EssentialsChatPlayer implements Listener event.setMessage(Util.stripColor(event.getMessage())); } String group = ess.getRanks().getMainGroup(user); - String world = user.getWorld().getName(); + String world = user.getPlayer().getWorld().getName(); IRanks groupSettings = ess.getRanks(); event.setFormat(groupSettings.getChatFormat(user).format(new Object[] diff --git a/EssentialsChat/src/net/ess3/chat/EssentialsLocalChatEventListener.java b/EssentialsChat/src/net/ess3/chat/EssentialsLocalChatEventListener.java index f248a21a4..be4c5305c 100644 --- a/EssentialsChat/src/net/ess3/chat/EssentialsLocalChatEventListener.java +++ b/EssentialsChat/src/net/ess3/chat/EssentialsLocalChatEventListener.java @@ -43,7 +43,7 @@ public class EssentialsLocalChatEventListener implements Listener if (!user.equals(sender)) { boolean abort = false; - final Location playerLoc = user.getLocation(); + final Location playerLoc = user.getPlayer().getLocation(); if (playerLoc.getWorld() != world) { abort = true; |