Fix /location not showing your own location when no arguments are given.

This commit is contained in:
UnknownShadow200 2018-01-14 18:24:08 +11:00
parent 0718c14b78
commit a9788cf928

View File

@ -16,7 +16,6 @@
permissions and limitations under the Licenses. permissions and limitations under the Licenses.
*/ */
using System; using System;
using System.IO;
using System.Net; using System.Net;
using MCGalaxy.Network; using MCGalaxy.Network;
@ -28,6 +27,11 @@ namespace MCGalaxy.Commands.Moderation {
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } } public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
public override void Use(Player p, string message) { public override void Use(Player p, string message) {
if (message.Length == 0) {
if (Player.IsSuper(p)) { SuperRequiresArgs(p, "name"); return; }
message = p.name;
}
string ip = ""; string ip = "";
Player match = PlayerInfo.FindMatches(p, message); Player match = PlayerInfo.FindMatches(p, message);
string target = message; string target = message;