Fixed player info

This commit is contained in:
Norbi Peti 2016-11-19 20:29:42 +01:00
parent a608998f59
commit f83f8f88b7
2 changed files with 7 additions and 10 deletions

View file

@ -229,8 +229,8 @@ public class ChatProcessing {
? "\nDeaths: "
+ PlayerListener.AlphaDeaths
: ""))))
.addExtra(new TellrawPart(
"For more, do /u info " + sender.getName())))));
.addExtra(new TellrawPart("\nFor more, do /u info "
+ sender.getName())))));
json.addExtra(new TellrawPart("> "));
long combinetime = System.nanoTime();
ChatFormatter.Combine(formatters, formattedmessage, json);

View file

@ -372,14 +372,11 @@ public class PlayerListener implements Listener {
public void onGetInfo(TBMCPlayerGetInfoEvent e) {
ChatPlayer cp = e.getPlayer().asPluginPlayer(ChatPlayer.class);
e.addInfo("Minecraft name: " + cp.getPlayerName());
e.addInfo("Reddit name: " + cp.getUserName());
if (e.getTarget() == InfoTarget.MCCommand)
e.addInfo("/r/TheButton flair: " + cp.GetFormattedFlair());
else {
final String flair = cp.GetFormattedFlair(true);
if (flair.length() > 0)
e.addInfo("/r/TheButton flair: " + flair);
}
if (cp.getUserName() != null && cp.getUserName().length() > 0)
e.addInfo("Reddit name: " + cp.getUserName());
final String flair = cp.GetFormattedFlair(e.getTarget() != InfoTarget.MCCommand);
if (flair.length() > 0)
e.addInfo("/r/TheButton flair: " + flair);
e.addInfo("Respect: " + (double) cp.getFCount() / (double) cp.getFDeaths());
}
}