diff --git a/MCGalaxy/Commands/Information/CmdWhere.cs b/MCGalaxy/Commands/Information/CmdWhere.cs index 36ff30141..d2f9456fb 100644 --- a/MCGalaxy/Commands/Information/CmdWhere.cs +++ b/MCGalaxy/Commands/Information/CmdWhere.cs @@ -43,7 +43,7 @@ namespace MCGalaxy.Commands.Info targetName = p.FormatNick((Player)target); } - target.DisplayPosition(p, targetName); + Entities.DisplayPosition(p, target, targetName); } public override void Help(Player p) { diff --git a/MCGalaxy/Entity/Entities.cs b/MCGalaxy/Entity/Entities.cs index 9d17af44e..8e639607b 100644 --- a/MCGalaxy/Entity/Entities.cs +++ b/MCGalaxy/Entity/Entities.cs @@ -15,6 +15,7 @@ permissions and limitations under the Licenses. using System; using MCGalaxy.Events.EntityEvents; using MCGalaxy.Network; +using MCGalaxy.Maths; namespace MCGalaxy { @@ -161,16 +162,19 @@ namespace MCGalaxy #endregion - - [Obsolete("Use p.CanSee")] - public static bool CanSee(Player p, Player target) { return p.CanSee(target); } - [Obsolete("Use p.CanSee")] - public static bool CanSee(CommandData data, Player p, Player target) { - return p == target || target == null || !target.hidden || data.Rank >= target.hideRank; - } + public static void DisplayPosition(Player p, Entity src, string displayName) { + Vec3S32 feet = src.Pos.FeetBlockCoords; + int x = src.Pos.X, y = src.Pos.Y - Entities.CharacterHeight, z = src.Pos.Z; + p.Message("{0} &Sis on {1}", displayName, src.Level.ColoredName); + p.Message(" Block coords: &b{0} {1} {2}", + feet.X, feet.Y, feet.Z); + p.Message(" Precise coords: &b{0} {1} {2}", + x, y, z); - [Obsolete("Use entity.UpdateModel")] - public static void UpdateModel(Entity e, string model) { e.UpdateModel(model); } + p.Message("Yaw pitch degrees: &b{0} {1}", + Orientation.PackedToDegrees(src.Rot.RotY), + Orientation.PackedToDegrees(src.Rot.HeadX)); + } internal static void BroadcastModel(Entity e, string m) { Player[] players = PlayerInfo.Online.Items; diff --git a/MCGalaxy/Entity/Entity.cs b/MCGalaxy/Entity/Entity.cs index b7b904c52..53ae53d82 100644 --- a/MCGalaxy/Entity/Entity.cs +++ b/MCGalaxy/Entity/Entity.cs @@ -81,18 +81,5 @@ namespace MCGalaxy SetModel(model); Entities.BroadcastModel(this, model); } - public void DisplayPosition(Player p, string displayName) { - Vec3S32 feet = Pos.FeetBlockCoords; - int x = Pos.X, y = Pos.Y - Entities.CharacterHeight, z = Pos.Z; - p.Message("{0} &Sis on {1}", displayName, Level.ColoredName); - p.Message(" Block coords: &b{0} {1} {2}", - feet.X, feet.Y, feet.Z); - p.Message(" Precise coords: &b{0} {1} {2}", - x, y, z); - - p.Message("Yaw pitch degrees: &b{0} {1}", - Orientation.PackedToDegrees(Rot.RotY), - Orientation.PackedToDegrees(Rot.HeadX)); - } } }