diff --git a/Plugins/Mineplex.Core/src/mineplex/core/friend/FriendManager.java b/Plugins/Mineplex.Core/src/mineplex/core/friend/FriendManager.java index 20be01b3e..4aa3c9866 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/friend/FriendManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/friend/FriendManager.java @@ -1,5 +1,6 @@ package mineplex.core.friend; +import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; @@ -263,6 +264,11 @@ public class FriendManager extends MiniClientPlugin caller.sendMessage(C.cAqua + C.Strike + "======================[" + ChatColor.RESET + C.cWhite + C.Bold + "Friends" + ChatColor.RESET + C.cAqua + C.Strike + "]======================"); + ArrayList sentLines = new ArrayList(); + ArrayList pendingLines = new ArrayList(); + ArrayList onlineLines = new ArrayList(); + ArrayList offlineLines = new ArrayList(); + for (FriendStatus friend : friendStatuses) { if (friend.Status == FriendStatusType.Blocked || friend.Status == FriendStatusType.Denied) @@ -273,37 +279,79 @@ public class FriendManager extends MiniClientPlugin gotAFriend = true; - ChildJsonMessage message = new JsonMessage(friend.Name).color(friend.Online ? "green" : "gray").extra(" - ").color("white"); - + ChildJsonMessage message = new JsonMessage("").color("white").extra("").color("white"); if (friend.Status == FriendStatusType.Accepted) { + //Online Friend if (friend.Online) { - message.add(friend.ServerName).color("dark_green").add(" - ").color("white"); - message.add("Teleport").color("green").bold().click("run_command", "/server " + friend.ServerName).hover("show_text", "Change to " + friend.Name + "'s server.").add(" - ").color("white"); + message.add("Teleport").color("green").bold().click("run_command", "/server " + friend.ServerName).hover("show_text", "Teleport to " + friend.Name + "'s server."); + message.add(" - ").color("white"); + message.add("Delete").color("red").bold().click("run_command", "/unfriend " + friend.Name).hover("show_text", "Remove " + friend.Name + " from your friends list."); + message.add(" - ").color("white"); + message.add(friend.Name).color(friend.Online ? "green" : "gray"); + message.add(" - ").color("white"); + message.add(friend.ServerName).color("dark_green"); + + onlineLines.add(message); } + //Offline Friend else - message.add("Last online : ").color("gray").add(UtilTime.MakeStr(friend.LastSeenOnline)).color("gray").add(" - ").color("white"); - - message.add("Unfriend").color("red").bold().click("run_command", "/unfriend " + friend.Name).hover("show_text", "Remove " + friend.Name + " from your friends list.").sendToPlayer(caller); + { + message.add("Delete").color("red").bold().click("run_command", "/unfriend " + friend.Name).hover("show_text", "Remove " + friend.Name + " from your friends list."); + message.add(" - ").color("white"); + message.add(friend.Name).color(friend.Online ? "green" : "gray"); + message.add(" - ").color("white"); + message.add("Offline for ").color("gray").add(UtilTime.MakeStr(friend.LastSeenOnline)).color("gray"); + + offlineLines.add(message); + } } + //Pending else if (friend.Status == FriendStatusType.Pending) { - message.add("Friendship Pending").color("gray").add(" - ").color("white"); - message.add("Accept").color("green").bold().click("run_command", "/friend " + friend.Name).hover("show_text", "Accept " + friend.Name + "'s friend request.").add(" - ").color("white"); - message.add("Deny").color("red").bold().click("run_command", "/unfriend " + friend.Name).hover("show_text", "Deny " + friend.Name + "'s friend request.").sendToPlayer(caller); + message.add("Accept").color("green").bold().click("run_command", "/friend " + friend.Name).hover("show_text", "Accept " + friend.Name + "'s friend request."); + message.add(" - ").color("white"); + message.add("Deny").color("red").bold().click("run_command", "/unfriend " + friend.Name).hover("show_text", "Deny " + friend.Name + "'s friend request."); + message.add(" - ").color("white"); + message.add(friend.Name + " Requested Friendship").color("gray"); + + pendingLines.add(message); } + //Sent else if (friend.Status == FriendStatusType.Sent) { - message.add("Friendship Requested").color("gray").add(" - ").color("white"); - message.add("Cancel").color("red").bold().click("run_command", "/unfriend " + friend.Name).hover("show_text", "Cancel friend request to " + friend.Name).sendToPlayer(caller); + message.add("Cancel").color("red").bold().click("run_command", "/unfriend " + friend.Name).hover("show_text", "Cancel friend request to " + friend.Name); + message.add(" - ").color("white"); + message.add(friend.Name + " Friendship Request").color("gray"); + + sentLines.add(message); } } + //Send In Order + for (JsonMessage msg : sentLines) + msg.sendToPlayer(caller); + + for (JsonMessage msg : offlineLines) + msg.sendToPlayer(caller); + + for (JsonMessage msg : pendingLines) + msg.sendToPlayer(caller); + + for (JsonMessage msg : onlineLines) + msg.sendToPlayer(caller); + if (!gotAFriend) { - caller.sendMessage(C.cGray + "You don't have any friends. Type " + ChatColor.GREEN + "/friend name" + ChatColor.GRAY + " to add someone!"); + caller.sendMessage(" "); + caller.sendMessage("Welcome to your Friends List!"); + caller.sendMessage(" "); + caller.sendMessage("To add friends, type " + C.cGreen + "/friend "); + caller.sendMessage(" "); + caller.sendMessage("Type " + C.cGreen + "/friend" + ChatColor.RESET + " at any time to interact with your friends!"); + caller.sendMessage(" "); } caller.sendMessage(C.cAqua + C.Strike + "====================================================="); diff --git a/Plugins/Nautilus.Game.Arcade/.classpath b/Plugins/Nautilus.Game.Arcade/.classpath index bf3c1e339..f8e20d113 100644 --- a/Plugins/Nautilus.Game.Arcade/.classpath +++ b/Plugins/Nautilus.Game.Arcade/.classpath @@ -8,6 +8,6 @@ - + diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldData.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldData.java index 04e47d2ec..b1e5c7536 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldData.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/world/WorldData.java @@ -39,7 +39,7 @@ public class WorldData public int MinZ = 0; public int MaxX = 0; public int MaxZ = 0; - public int CurX = 0; + public int CurX = 0; public int CurZ = 0; public int MinY = -1;