diff options
Diffstat (limited to 'EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java')
-rw-r--r-- | EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java index cbe89f9d6..695969378 100644 --- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java @@ -5,27 +5,14 @@ import com.earth2me.essentials.EssentialsConf; import com.earth2me.essentials.IConf; import com.earth2me.essentials.IUser; import java.io.File; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.Logger; import org.bukkit.entity.Player; -import org.bukkit.plugin.java.JavaPlugin; -import org.jivesoftware.smack.Chat; -import org.jivesoftware.smack.ChatManager; -import org.jivesoftware.smack.ChatManagerListener; -import org.jivesoftware.smack.ConnectionConfiguration; -import org.jivesoftware.smack.MessageListener; import org.jivesoftware.smack.Roster.SubscriptionMode; -import org.jivesoftware.smack.XMPPConnection; -import org.jivesoftware.smack.XMPPException; +import org.jivesoftware.smack.*; import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.util.StringUtils; @@ -69,7 +56,8 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager } if (chat != null) { - if (!connection.isConnected()) { + if (!connection.isConnected()) + { disconnect(); connect(); } @@ -103,7 +91,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager break; default: final IUser sender = parent.getUserByAddress(StringUtils.parseBareAddress(chat.getParticipant())); - parent.broadcastMessage(sender, "="+sender.getDisplayName()+": "+ message, StringUtils.parseBareAddress(chat.getParticipant())); + parent.broadcastMessage(sender, "=" + sender.getDisplayName() + ": " + message, StringUtils.parseBareAddress(chat.getParticipant())); } } } |