Fix checkstyle violations (#144)

This commit is contained in:
Josh authored and GitHub committed 2021-05-21 07:26:29 -07:00
1 parent a204b2772c
commit a682d0dd59
2 files changed
+19

No files matched your search

@@ -120,14 +120,32 @@ public class CarbonChatEvent implements ResultedCarbonEvent<CarbonChatEvent.Resu
this.result = result;
}
/**
* The result of this event.
*
* @since 2.0.0
*/
public record Result(boolean cancelled, Component reason) implements ResultedCarbonEvent.Result {
private static final Result ALLOWED = new Result(true, empty());
/**
* Returns a Result that denotes the event was allowed and not cancelled.
*
* @return an allowed result
* @since 2.0.0
*/
public static Result allowed() {
return ALLOWED;
}
/**
* Returns a Result that denotes the event was denied and cancelled.
*
* @param reason the reason the event was denied
* @return a denied result
* @since 2.0.0
*/
public static Result denied(final Component reason) {
return new Result(false, reason);
}
@@ -27,6 +27,7 @@ public interface ResultedCarbonEvent<R extends ResultedCarbonEvent.Result> exten
/**
* Represents the result of the event.
*
* @since 2.0.0
*/
interface Result {