Fixed /u name and such
This commit is contained in:
parent
6d9037592a
commit
398ec7ce25
2 changed files with 6 additions and 6 deletions
|
@ -48,7 +48,7 @@ public class ChatPlayer extends TBMCPlayer {
|
||||||
.warning("Can't load player " + p.getUniqueId() + " - " + p.getName());
|
.warning("Can't load player " + p.getUniqueId() + " - " + p.getName());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
ChatPlayer.OnlinePlayers.get(player.UUID);
|
return ChatPlayer.OnlinePlayers.get(player.UUID);
|
||||||
}
|
}
|
||||||
return ChatPlayer.OnlinePlayers.get(p.getUniqueId());
|
return ChatPlayer.OnlinePlayers.get(p.getUniqueId());
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -16,16 +16,16 @@ public class NameCommand extends UCommandBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
||||||
if (args.length == 1) {
|
if (args.length == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ChatPlayer mp = ChatPlayer.GetFromName(args[1]);
|
ChatPlayer mp = ChatPlayer.GetFromName(args[0]);
|
||||||
if (mp == null) {
|
if (mp == null) {
|
||||||
sender.sendMessage("§cUnknown user (player has to be online): "
|
sender.sendMessage("§cUnknown user: "
|
||||||
+ args[1]);
|
+ args[0]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
sender.sendMessage("§bUsername of " + args[1] + ": " + mp.UserName);
|
sender.sendMessage("§bUsername of " + args[0] + ": " + mp.UserName);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue