Mix of Checkstyle and SonarLint.
This commit is contained in:
@@ -4,7 +4,7 @@ import com.google.common.base.Preconditions;
|
||||
import com.velocitypowered.api.proxy.InboundConnection;
|
||||
|
||||
/**
|
||||
* This event is fired when a handshake is established between a client and Velocity.
|
||||
* This event is fired when a handshake is established between a client and the proxy.
|
||||
*/
|
||||
public final class ConnectionHandshakeEvent {
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ public @interface Plugin {
|
||||
|
||||
/**
|
||||
* The ID of the plugin. This ID should be unique as to not conflict with other plugins. The
|
||||
* plugin ID must match the {@link PluginDescription#ID_PATTERN}.
|
||||
* plugin ID may contain alphanumeric characters, dashes, and underscores, and be a maximum
|
||||
* of 64 characters long.
|
||||
*
|
||||
* @return the ID for this plugin
|
||||
*/
|
||||
|
||||
@@ -186,21 +186,23 @@ public final class TextTitle implements Title {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder stay(int ticks) {
|
||||
private int checkTicks(int ticks) {
|
||||
Preconditions.checkArgument(ticks >= 0, "ticks value %s is negative", ticks);
|
||||
this.stay = ticks;
|
||||
return ticks;
|
||||
}
|
||||
|
||||
public Builder stay(int ticks) {
|
||||
this.stay = checkTicks(ticks);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder fadeIn(int ticks) {
|
||||
Preconditions.checkArgument(ticks >= 0, "ticks value %s is negative", ticks);
|
||||
this.fadeIn = ticks;
|
||||
this.fadeIn = checkTicks(ticks);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder fadeOut(int ticks) {
|
||||
Preconditions.checkArgument(ticks >= 0, "ticks value %s is negative", ticks);
|
||||
this.fadeOut = ticks;
|
||||
this.fadeOut = checkTicks(ticks);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user