Fixed /u name and such

This commit is contained in:
Norbi Peti 2016-09-30 13:22:39 +02:00
parent 6d9037592a
commit 398ec7ce25
2 changed files with 6 additions and 6 deletions

View file

@ -48,7 +48,7 @@ public class ChatPlayer extends TBMCPlayer {
.warning("Can't load player " + p.getUniqueId() + " - " + p.getName());
return null;
}
ChatPlayer.OnlinePlayers.get(player.UUID);
return ChatPlayer.OnlinePlayers.get(player.UUID);
}
return ChatPlayer.OnlinePlayers.get(p.getUniqueId());
} else

View file

@ -16,16 +16,16 @@ public class NameCommand extends UCommandBase {
@Override
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
if (args.length == 1) {
if (args.length == 0) {
return false;
}
ChatPlayer mp = ChatPlayer.GetFromName(args[1]);
ChatPlayer mp = ChatPlayer.GetFromName(args[0]);
if (mp == null) {
sender.sendMessage("§cUnknown user (player has to be online): "
+ args[1]);
sender.sendMessage("§cUnknown user: "
+ args[0]);
return true;
}
sender.sendMessage("§bUsername of " + args[1] + ": " + mp.UserName);
sender.sendMessage("§bUsername of " + args[0] + ": " + mp.UserName);
return true;
}