mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Fix checkstyle violations (#144)
This commit is contained in:
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 {
|
||||
|
||||
Reference in new issue
Block a user