diff options
author | snowleo <schneeleo@gmail.com> | 2011-12-14 16:31:08 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-12-14 16:31:08 +0100 |
commit | 0155bcedb7f00726d0b2f14e612a5342322a8278 (patch) | |
tree | a490495781c26b553f719dda2b70ece6889a3605 /EssentialsChat/src/com | |
parent | 9ab2fe54fcea6565bdfc29aa3e3c60cb07adf1b2 (diff) | |
download | Essentials-0155bcedb7f00726d0b2f14e612a5342322a8278.tar Essentials-0155bcedb7f00726d0b2f14e612a5342322a8278.tar.gz Essentials-0155bcedb7f00726d0b2f14e612a5342322a8278.tar.lz Essentials-0155bcedb7f00726d0b2f14e612a5342322a8278.tar.xz Essentials-0155bcedb7f00726d0b2f14e612a5342322a8278.zip |
Updated all modules to new api, some settings are still missing
Diffstat (limited to 'EssentialsChat/src/com')
5 files changed, 17 insertions, 17 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java index 25ce85cc8..265322255 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java @@ -1,7 +1,7 @@ package com.earth2me.essentials.chat; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.IEssentials; +import com.earth2me.essentials.api.IEssentials; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentSkipListMap; diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java index 2d6e1ae4e..349cc7e28 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java @@ -2,9 +2,9 @@ package com.earth2me.essentials.chat; import com.earth2me.essentials.ChargeException; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.IEssentials; +import com.earth2me.essentials.api.IEssentials; import com.earth2me.essentials.Trade; -import com.earth2me.essentials.User; +import com.earth2me.essentials.api.IUser; import java.util.Map; import java.util.logging.Logger; import org.bukkit.Location; @@ -53,7 +53,7 @@ public abstract class EssentialsChatPlayer extends PlayerListener } } - final User user = ess.getUser(event.getPlayer()); + final IUser user = ess.getUser(event.getPlayer()); if (!isAffordableFor(user, command)) { event.setCancelled(true); @@ -106,7 +106,7 @@ public abstract class EssentialsChatPlayer extends PlayerListener return true; } - protected void sendLocalChat(final User sender, final long radius, final PlayerChatEvent event) + protected void sendLocalChat(final IUser sender, final long radius, final PlayerChatEvent event) { event.setCancelled(true); logger.info(_("localFormat", sender.getName(), event.getMessage())); @@ -116,9 +116,9 @@ public abstract class EssentialsChatPlayer extends PlayerListener for (Player onlinePlayer : server.getOnlinePlayers()) { String type = "[L]"; - final User user = ess.getUser(onlinePlayer); + final IUser user = ess.getUser(onlinePlayer); //TODO: remove reference to op - if (user.isIgnoredPlayer(sender.getName()) && !sender.isOp()) + if (user.isIgnoringPlayer(sender.getName()) && !sender.isOp()) { continue; } diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java index 22989d4f9..d2098f4a6 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java @@ -1,8 +1,8 @@ package com.earth2me.essentials.chat; import com.earth2me.essentials.ChargeException; -import com.earth2me.essentials.IEssentials; -import com.earth2me.essentials.User; +import com.earth2me.essentials.api.IEssentials; +import com.earth2me.essentials.api.IUser; import java.util.Map; import org.bukkit.Server; import org.bukkit.event.player.PlayerChatEvent; @@ -37,7 +37,7 @@ public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer /** * This file should handle charging the user for the action before returning control back */ - final User user = ess.getUser(event.getPlayer()); + final IUser user = ess.getUser(event.getPlayer()); try { @@ -45,7 +45,7 @@ public class EssentialsChatPlayerListenerHighest extends EssentialsChatPlayer } catch (ChargeException e) { - ess.showError(user, e, charge); + ess.getCommandHandler().showCommandError(user, charge, e); event.setCancelled(true); return; } diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java index de5757951..80b725d28 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java @@ -1,7 +1,7 @@ package com.earth2me.essentials.chat; -import com.earth2me.essentials.IEssentials; -import com.earth2me.essentials.User; +import com.earth2me.essentials.api.IEssentials; +import com.earth2me.essentials.api.IUser; import java.util.Locale; import java.util.Map; import org.bukkit.Server; @@ -28,7 +28,7 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer /** * This listener should apply the general chat formatting only...then return control back the event handler */ - final User user = ess.getUser(event.getPlayer()); + final IUser user = ess.getUser(event.getPlayer()); if (user.isAuthorized("essentials.chat.color")) { event.setMessage(event.getMessage().replaceAll("&([0-9a-f])", "\u00a7$1")); diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java index 4e3cbefc0..34aba2be0 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java @@ -1,8 +1,8 @@ package com.earth2me.essentials.chat; import static com.earth2me.essentials.I18n._; -import com.earth2me.essentials.IEssentials; -import com.earth2me.essentials.User; +import com.earth2me.essentials.api.IEssentials; +import com.earth2me.essentials.api.IUser; import java.util.Locale; import java.util.Map; import org.bukkit.Server; @@ -48,7 +48,7 @@ public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer return; } radius *= radius; - final User user = ess.getUser(event.getPlayer()); + final IUser user = ess.getUser(event.getPlayer()); if (event.getMessage().length() > 0 && chatType.length() > 0) { |