Fixed player info
This commit is contained in:
parent
a608998f59
commit
f83f8f88b7
2 changed files with 7 additions and 10 deletions
|
@ -229,8 +229,8 @@ public class ChatProcessing {
|
||||||
? "\nDeaths: "
|
? "\nDeaths: "
|
||||||
+ PlayerListener.AlphaDeaths
|
+ PlayerListener.AlphaDeaths
|
||||||
: ""))))
|
: ""))))
|
||||||
.addExtra(new TellrawPart(
|
.addExtra(new TellrawPart("\nFor more, do /u info "
|
||||||
"For more, do /u info " + sender.getName())))));
|
+ sender.getName())))));
|
||||||
json.addExtra(new TellrawPart("> "));
|
json.addExtra(new TellrawPart("> "));
|
||||||
long combinetime = System.nanoTime();
|
long combinetime = System.nanoTime();
|
||||||
ChatFormatter.Combine(formatters, formattedmessage, json);
|
ChatFormatter.Combine(formatters, formattedmessage, json);
|
||||||
|
|
|
@ -372,14 +372,11 @@ public class PlayerListener implements Listener {
|
||||||
public void onGetInfo(TBMCPlayerGetInfoEvent e) {
|
public void onGetInfo(TBMCPlayerGetInfoEvent e) {
|
||||||
ChatPlayer cp = e.getPlayer().asPluginPlayer(ChatPlayer.class);
|
ChatPlayer cp = e.getPlayer().asPluginPlayer(ChatPlayer.class);
|
||||||
e.addInfo("Minecraft name: " + cp.getPlayerName());
|
e.addInfo("Minecraft name: " + cp.getPlayerName());
|
||||||
|
if (cp.getUserName() != null && cp.getUserName().length() > 0)
|
||||||
e.addInfo("Reddit name: " + cp.getUserName());
|
e.addInfo("Reddit name: " + cp.getUserName());
|
||||||
if (e.getTarget() == InfoTarget.MCCommand)
|
final String flair = cp.GetFormattedFlair(e.getTarget() != InfoTarget.MCCommand);
|
||||||
e.addInfo("/r/TheButton flair: " + cp.GetFormattedFlair());
|
|
||||||
else {
|
|
||||||
final String flair = cp.GetFormattedFlair(true);
|
|
||||||
if (flair.length() > 0)
|
if (flair.length() > 0)
|
||||||
e.addInfo("/r/TheButton flair: " + flair);
|
e.addInfo("/r/TheButton flair: " + flair);
|
||||||
}
|
|
||||||
e.addInfo("Respect: " + (double) cp.getFCount() / (double) cp.getFDeaths());
|
e.addInfo("Respect: " + (double) cp.getFCount() / (double) cp.getFDeaths());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue