If results aren't successful, only print the error
This commit is contained in:
parent
ae6f361ac1
commit
a84189e290
1 changed files with 5 additions and 0 deletions
|
|
@ -69,6 +69,11 @@ public class PluginResults<T> implements Iterable<PluginResult<T>> {
|
||||||
* Sends the result(s) to the given sender.
|
* Sends the result(s) to the given sender.
|
||||||
*/
|
*/
|
||||||
public void sendTo(ServerUtilsAudience<?> sender, ConfigKey successKey) {
|
public void sendTo(ServerUtilsAudience<?> sender, ConfigKey successKey) {
|
||||||
|
if (!isSuccess()) {
|
||||||
|
last().sendTo(sender, successKey);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (PluginResult<T> result : results) {
|
for (PluginResult<T> result : results) {
|
||||||
result.sendTo(sender, successKey);
|
result.sendTo(sender, successKey);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue