Skip to content
This repository was archived by the owner on Nov 25, 2019. It is now read-only.

Conversation

PotatoStealer
Copy link

No description provided.

final Audience audience = audiences.get(sender);
audience.sendMessage(new HeaderComponent(title));
for(Report report : reportResult.documents()) {
if(report.reported() != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should check if the player is offline here instead of in ReportFormatter. That would avoid calling audience.sendmessage() for a bunch of empty collections.

@cswhite2000
Copy link
Member

You seem to have removed the code that makes the o flag actually do anything. Also you should probably make it so when you use the a flag it shows players that are online on other servers not just the current one

@@ -1,12 +1,14 @@
package tc.oc.commons.bukkit.report;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your changes in reportformatter don’t seem to do anything. They can probably just be discarded.

for(Report report : reportResult.documents()) {
if(report.reported() != null) {
audience.sendMessages(reportFormatter.format(report, crossServer, true));
if(report.reported() != null && onlinePlayers.find(report.reported()).isOnline()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

report.reported() != null && (showOffline || onlinePlayers.find(report.reported()).isOnline())

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to figure out how to get this to work with the a flag

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants