Skip to content

Commit

Permalink
Merge pull request #1127 from KyoriPowered/renovate/checkstyle
Browse files Browse the repository at this point in the history
chore(deps): Update dependency com.puppycrawl.tools:checkstyle to v10.20.0
  • Loading branch information
zml2008 authored Nov 3, 2024
2 parents d446734 + a0a7060 commit 57f367f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions api/src/main/java/net/kyori/adventure/audience/Audience.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@
* command sender, console, or otherwise who can receive text, titles,
* boss bars, and other Minecraft media. It is also designed for a group of
* receivers such as a team, server, world, or permission.</p>
*
* <p>In the past, Minecraft platforms have typically reserved methods such as
* <code>showTitle</code> for a <code>Player</code> interface. While this is good
* textbook object-oriented design, it presents two key drawbacks: 1) there
* is no abstraction for groups of players, such as a <code>Server</code> or a
* <code>Team</code> and 2) it add boilerplate for handling special cases like
* console or command senders.</p>
*
* <p>Consider the use-case of sending a message and title to every player on a
* server, and also sending a message to console. Without an <code>Audience</code>,
* the code might look like this:</p>
Expand All @@ -77,17 +79,20 @@
* player.showTitle(...);
* }
* server.getConsole().sendMessage(...);</pre>
*
* <p>Now, if <code>Server</code> implemented <code>Audience</code>, its unified interface
* would allow users to easily send media without if-guarding console or
* iterating through the list of players:</p>
* <pre>
* Server server;
* server.sendMessage(...); // Sends a message to players and console
* server.showTitle(...); // Shows a title to players, silently ignored by console</pre>
*
* <p>When an <code>Audience</code> is unable to perform an operation, such as sending
* a boss bar to console, it will silently fail, without logging. This
* requirement allows users to easily send media to a group of
* <code>Audience</code>s without checking each for compatibility.</p>
*
* <p>While the scope of <code>Audience</code> may be expanded in the future to support
* new Minecraft media such as the player list, its interface will remain stateless
* and any new methods will be stubbed by default.</p>
Expand Down
1 change: 1 addition & 0 deletions api/src/main/java/net/kyori/adventure/bossbar/BossBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

/**
* Represents an in-game bossbar which can be shown to the client.
*
* <p>A bossbar consists of:</p>
* <dl>
* <dt>name</dt>
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version = "1.0"

[versions]
autoService = "1.1.1"
checkstyle = "10.18.2"
checkstyle = "10.20.0"
errorprone = "2.31.0"
examination = "1.3.0"
guava = "33.3.1-jre"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ interface Builder extends AbstractBuilder<MiniMessage> {

/**
* Specify a function that takes the component at the end of the parser process.
*
* <p>By default, this compacts the resulting component with {@link Component#compact()}.</p>
*
* @param postProcessor method run at the end of parsing
Expand All @@ -372,6 +373,7 @@ interface Builder extends AbstractBuilder<MiniMessage> {

/**
* Specify a function that takes the string at the start of the parser process.
*
* <p>By default, this does absolutely nothing.</p>
*
* @param preProcessor method run at the start of parsing
Expand Down

0 comments on commit 57f367f

Please sign in to comment.