geforkt von Mirrors/Velocity
Fixed most Checkstyle warnings in the API.
Dieser Commit ist enthalten in:
Ursprung
25b5e00125
Commit
6467335f74
@ -57,8 +57,8 @@ public class PluginAnnotationProcessor extends AbstractProcessor {
|
|||||||
if (Objects.equals(pluginClassFound, qualifiedName.toString())) {
|
if (Objects.equals(pluginClassFound, qualifiedName.toString())) {
|
||||||
if (!warnedAboutMultiplePlugins) {
|
if (!warnedAboutMultiplePlugins) {
|
||||||
environment.getMessager()
|
environment.getMessager()
|
||||||
.printMessage(Diagnostic.Kind.WARNING, "Velocity does not yet currently support " +
|
.printMessage(Diagnostic.Kind.WARNING, "Velocity does not yet currently support "
|
||||||
"multiple plugins. We are using " + pluginClassFound
|
+ "multiple plugins. We are using " + pluginClassFound
|
||||||
+ " for your plugin's main class.");
|
+ " for your plugin's main class.");
|
||||||
warnedAboutMultiplePlugins = true;
|
warnedAboutMultiplePlugins = true;
|
||||||
}
|
}
|
||||||
@ -69,8 +69,8 @@ public class PluginAnnotationProcessor extends AbstractProcessor {
|
|||||||
if (!PluginDescription.ID_PATTERN.matcher(plugin.id()).matches()) {
|
if (!PluginDescription.ID_PATTERN.matcher(plugin.id()).matches()) {
|
||||||
environment.getMessager().printMessage(Diagnostic.Kind.ERROR, "Invalid ID for plugin "
|
environment.getMessager().printMessage(Diagnostic.Kind.ERROR, "Invalid ID for plugin "
|
||||||
+ qualifiedName
|
+ qualifiedName
|
||||||
+ ". IDs must start alphabetically, have alphanumeric characters, and can " +
|
+ ". IDs must start alphabetically, have alphanumeric characters, and can "
|
||||||
"contain dashes or underscores.");
|
+ "contain dashes or underscores.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ public class SerializedPluginDescription {
|
|||||||
private final @Nullable List<Dependency> dependencies;
|
private final @Nullable List<Dependency> dependencies;
|
||||||
private final String main;
|
private final String main;
|
||||||
|
|
||||||
public SerializedPluginDescription(String id, String name, String version, String description,
|
private SerializedPluginDescription(String id, String name, String version, String description,
|
||||||
String url,
|
String url,
|
||||||
List<String> authors, List<Dependency> dependencies, String main) {
|
List<String> authors, List<Dependency> dependencies, String main) {
|
||||||
this.id = Preconditions.checkNotNull(id, "id");
|
this.id = Preconditions.checkNotNull(id, "id");
|
||||||
@ -37,7 +37,7 @@ public class SerializedPluginDescription {
|
|||||||
this.main = Preconditions.checkNotNull(main, "main");
|
this.main = Preconditions.checkNotNull(main, "main");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SerializedPluginDescription from(Plugin plugin, String qualifiedName) {
|
static SerializedPluginDescription from(Plugin plugin, String qualifiedName) {
|
||||||
List<Dependency> dependencies = new ArrayList<>();
|
List<Dependency> dependencies = new ArrayList<>();
|
||||||
for (com.velocitypowered.api.plugin.Dependency dependency : plugin.dependencies()) {
|
for (com.velocitypowered.api.plugin.Dependency dependency : plugin.dependencies()) {
|
||||||
dependencies.add(new Dependency(dependency.id(), dependency.optional()));
|
dependencies.add(new Dependency(dependency.id(), dependency.optional()));
|
||||||
@ -89,14 +89,14 @@ public class SerializedPluginDescription {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SerializedPluginDescription that = (SerializedPluginDescription) o;
|
SerializedPluginDescription that = (SerializedPluginDescription) o;
|
||||||
return Objects.equals(id, that.id) &&
|
return Objects.equals(id, that.id)
|
||||||
Objects.equals(name, that.name) &&
|
&& Objects.equals(name, that.name)
|
||||||
Objects.equals(version, that.version) &&
|
&& Objects.equals(version, that.version)
|
||||||
Objects.equals(description, that.description) &&
|
&& Objects.equals(description, that.description)
|
||||||
Objects.equals(url, that.url) &&
|
&& Objects.equals(url, that.url)
|
||||||
Objects.equals(authors, that.authors) &&
|
&& Objects.equals(authors, that.authors)
|
||||||
Objects.equals(dependencies, that.dependencies) &&
|
&& Objects.equals(dependencies, that.dependencies)
|
||||||
Objects.equals(main, that.main);
|
&& Objects.equals(main, that.main);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -106,16 +106,16 @@ public class SerializedPluginDescription {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "SerializedPluginDescription{" +
|
return "SerializedPluginDescription{"
|
||||||
"id='" + id + '\'' +
|
+ "id='" + id + '\''
|
||||||
", name='" + name + '\'' +
|
+ ", name='" + name + '\''
|
||||||
", version='" + version + '\'' +
|
+ ", version='" + version + '\''
|
||||||
", description='" + description + '\'' +
|
+ ", description='" + description + '\''
|
||||||
", url='" + url + '\'' +
|
+ ", url='" + url + '\''
|
||||||
", authors=" + authors +
|
+ ", authors=" + authors
|
||||||
", dependencies=" + dependencies +
|
+ ", dependencies=" + dependencies
|
||||||
", main='" + main + '\'' +
|
+ ", main='" + main + '\''
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Dependency {
|
public static class Dependency {
|
||||||
@ -145,8 +145,8 @@ public class SerializedPluginDescription {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Dependency that = (Dependency) o;
|
Dependency that = (Dependency) o;
|
||||||
return optional == that.optional &&
|
return optional == that.optional
|
||||||
Objects.equals(id, that.id);
|
&& Objects.equals(id, that.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -156,10 +156,10 @@ public class SerializedPluginDescription {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Dependency{" +
|
return "Dependency{"
|
||||||
"id='" + id + '\'' +
|
+ "id='" + id + '\''
|
||||||
", optional=" + optional +
|
+ ", optional=" + optional
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,8 +20,8 @@ public final class ConnectionHandshakeEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ConnectionHandshakeEvent{" +
|
return "ConnectionHandshakeEvent{"
|
||||||
"connection=" + connection +
|
+ "connection=" + connection
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,8 +21,8 @@ public final class DisconnectEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "DisconnectEvent{" +
|
return "DisconnectEvent{"
|
||||||
"player=" + player +
|
+ "player=" + player
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,9 +34,9 @@ public final class LoginEvent implements ResultedEvent<ResultedEvent.ComponentRe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "LoginEvent{" +
|
return "LoginEvent{"
|
||||||
"player=" + player +
|
+ "player=" + player
|
||||||
", result=" + result +
|
+ ", result=" + result
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ import com.google.common.base.Preconditions;
|
|||||||
import com.google.common.io.ByteArrayDataInput;
|
import com.google.common.io.ByteArrayDataInput;
|
||||||
import com.google.common.io.ByteStreams;
|
import com.google.common.io.ByteStreams;
|
||||||
import com.velocitypowered.api.event.ResultedEvent;
|
import com.velocitypowered.api.event.ResultedEvent;
|
||||||
|
import com.velocitypowered.api.proxy.Player;
|
||||||
|
import com.velocitypowered.api.proxy.ServerConnection;
|
||||||
import com.velocitypowered.api.proxy.messages.ChannelIdentifier;
|
import com.velocitypowered.api.proxy.messages.ChannelIdentifier;
|
||||||
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
|
import com.velocitypowered.api.proxy.messages.ChannelMessageSink;
|
||||||
import com.velocitypowered.api.proxy.messages.ChannelMessageSource;
|
import com.velocitypowered.api.proxy.messages.ChannelMessageSource;
|
||||||
@ -11,7 +13,7 @@ import java.util.Arrays;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is fired when a plugin message is sent to the proxy, either from a client ({@link
|
* This event is fired when a plugin message is sent to the proxy, either from a client ({@link
|
||||||
* com.velocitypowered.api.proxy.Player}) or a server ({@link com.velocitypowered.api.proxy.ServerConnection}).
|
* Player}) or a server ({@link ServerConnection}).
|
||||||
*/
|
*/
|
||||||
public final class PluginMessageEvent implements ResultedEvent<PluginMessageEvent.ForwardResult> {
|
public final class PluginMessageEvent implements ResultedEvent<PluginMessageEvent.ForwardResult> {
|
||||||
|
|
||||||
@ -21,6 +23,14 @@ public final class PluginMessageEvent implements ResultedEvent<PluginMessageEven
|
|||||||
private final byte[] data;
|
private final byte[] data;
|
||||||
private ForwardResult result;
|
private ForwardResult result;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance.
|
||||||
|
*
|
||||||
|
* @param source the source of the plugin message
|
||||||
|
* @param target the destination of the plugin message
|
||||||
|
* @param identifier the channel for this plugin message
|
||||||
|
* @param data the payload of the plugin message
|
||||||
|
*/
|
||||||
public PluginMessageEvent(ChannelMessageSource source, ChannelMessageSink target,
|
public PluginMessageEvent(ChannelMessageSource source, ChannelMessageSink target,
|
||||||
ChannelIdentifier identifier, byte[] data) {
|
ChannelIdentifier identifier, byte[] data) {
|
||||||
this.source = Preconditions.checkNotNull(source, "source");
|
this.source = Preconditions.checkNotNull(source, "source");
|
||||||
@ -62,13 +72,13 @@ public final class PluginMessageEvent implements ResultedEvent<PluginMessageEven
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "PluginMessageEvent{" +
|
return "PluginMessageEvent{"
|
||||||
"source=" + source +
|
+ "source=" + source
|
||||||
", target=" + target +
|
+ ", target=" + target
|
||||||
", identifier=" + identifier +
|
+ ", identifier=" + identifier
|
||||||
", data=" + Arrays.toString(data) +
|
+ ", data=" + Arrays.toString(data)
|
||||||
", result=" + result +
|
+ ", result=" + result
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,8 +4,8 @@ import com.google.common.base.Preconditions;
|
|||||||
import com.velocitypowered.api.proxy.Player;
|
import com.velocitypowered.api.proxy.Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is fired once the player has been successfully authenticated and fully initialized and
|
* This event is fired once the player has been fully initialized and is about to connect to their
|
||||||
* player will be connected to server after this event
|
* first server.
|
||||||
*/
|
*/
|
||||||
public final class PostLoginEvent {
|
public final class PostLoginEvent {
|
||||||
|
|
||||||
|
@ -19,6 +19,11 @@ public final class PreLoginEvent implements ResultedEvent<PreLoginEvent.PreLogin
|
|||||||
private final String username;
|
private final String username;
|
||||||
private PreLoginComponentResult result;
|
private PreLoginComponentResult result;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance.
|
||||||
|
* @param connection the connection logging into the proxy
|
||||||
|
* @param username the player's username
|
||||||
|
*/
|
||||||
public PreLoginEvent(InboundConnection connection, String username) {
|
public PreLoginEvent(InboundConnection connection, String username) {
|
||||||
this.connection = Preconditions.checkNotNull(connection, "connection");
|
this.connection = Preconditions.checkNotNull(connection, "connection");
|
||||||
this.username = Preconditions.checkNotNull(username, "username");
|
this.username = Preconditions.checkNotNull(username, "username");
|
||||||
@ -45,11 +50,11 @@ public final class PreLoginEvent implements ResultedEvent<PreLoginEvent.PreLogin
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "PreLoginEvent{" +
|
return "PreLoginEvent{"
|
||||||
"connection=" + connection +
|
+ "connection=" + connection
|
||||||
", username='" + username + '\'' +
|
+ ", username='" + username + '\''
|
||||||
", result=" + result +
|
+ ", result=" + result
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,7 +131,7 @@ public final class PreLoginEvent implements ResultedEvent<PreLoginEvent.PreLogin
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a result indicating the connection will be allowed through the proxy, but the
|
* Returns a result indicating the connection will be allowed through the proxy, but the
|
||||||
* connection will be forced to use offline mode even when proxy running in online mode
|
* connection will be forced to use offline mode even when the proxy is running in online mode.
|
||||||
*
|
*
|
||||||
* @return the result
|
* @return the result
|
||||||
*/
|
*/
|
||||||
|
@ -54,10 +54,10 @@ public final class PermissionsSetupEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "PermissionsSetupEvent{" +
|
return "PermissionsSetupEvent{"
|
||||||
"subject=" + subject +
|
+ "subject=" + subject
|
||||||
", defaultProvider=" + defaultProvider +
|
+ ", defaultProvider=" + defaultProvider
|
||||||
", provider=" + provider +
|
+ ", provider=" + provider
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,12 @@ public final class GameProfileRequestEvent {
|
|||||||
private final boolean onlineMode;
|
private final boolean onlineMode;
|
||||||
private @Nullable GameProfile gameProfile;
|
private @Nullable GameProfile gameProfile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance.
|
||||||
|
* @param connection the connection connecting to the proxy
|
||||||
|
* @param originalProfile the original {@link GameProfile} for the user
|
||||||
|
* @param onlineMode whether or not the user connected in online or offline mode
|
||||||
|
*/
|
||||||
public GameProfileRequestEvent(InboundConnection connection, GameProfile originalProfile,
|
public GameProfileRequestEvent(InboundConnection connection, GameProfile originalProfile,
|
||||||
boolean onlineMode) {
|
boolean onlineMode) {
|
||||||
this.connection = Preconditions.checkNotNull(connection, "connection");
|
this.connection = Preconditions.checkNotNull(connection, "connection");
|
||||||
@ -57,21 +63,19 @@ public final class GameProfileRequestEvent {
|
|||||||
* Sets the game profile to use for this connection. It is invalid to use this method on an
|
* Sets the game profile to use for this connection. It is invalid to use this method on an
|
||||||
* online-mode connection.
|
* online-mode connection.
|
||||||
*
|
*
|
||||||
* @param gameProfile the profile to use for the connection, {@code null} uses the original
|
* @param gameProfile the profile for this connection, {@code null} uses the original profile
|
||||||
* profile
|
|
||||||
*/
|
*/
|
||||||
public void setGameProfile(@Nullable GameProfile gameProfile) {
|
public void setGameProfile(@Nullable GameProfile gameProfile) {
|
||||||
Preconditions
|
Preconditions.checkState(!onlineMode, "Profiles can not be faked in online mode!");
|
||||||
.checkState(!onlineMode, "Connection is in online mode, profiles can not be faked");
|
|
||||||
this.gameProfile = gameProfile;
|
this.gameProfile = gameProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "GameProfileRequestEvent{" +
|
return "GameProfileRequestEvent{"
|
||||||
"username=" + username +
|
+ "username=" + username
|
||||||
", gameProfile=" + gameProfile +
|
+ ", gameProfile=" + gameProfile
|
||||||
"}";
|
+ "}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,11 +42,11 @@ public final class PlayerChatEvent implements ResultedEvent<PlayerChatEvent.Chat
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "PlayerChatEvent{" +
|
return "PlayerChatEvent{"
|
||||||
"player=" + player +
|
+ "player=" + player
|
||||||
", message=" + message +
|
+ ", message=" + message
|
||||||
", result=" + result +
|
+ ", result=" + result
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.velocitypowered.api.event.player;
|
package com.velocitypowered.api.event.player;
|
||||||
|
|
||||||
|
import com.google.common.base.MoreObjects;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.velocitypowered.api.proxy.Player;
|
import com.velocitypowered.api.proxy.Player;
|
||||||
import com.velocitypowered.api.util.ModInfo;
|
import com.velocitypowered.api.util.ModInfo;
|
||||||
@ -24,4 +25,12 @@ public final class PlayerModInfoEvent {
|
|||||||
public ModInfo getModInfo() {
|
public ModInfo getModInfo() {
|
||||||
return modInfo;
|
return modInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return MoreObjects.toStringHelper(this)
|
||||||
|
.add("player", player)
|
||||||
|
.add("modInfo", modInfo)
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.velocitypowered.api.event.player;
|
package com.velocitypowered.api.event.player;
|
||||||
|
|
||||||
|
import com.google.common.base.MoreObjects;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.velocitypowered.api.proxy.Player;
|
import com.velocitypowered.api.proxy.Player;
|
||||||
import com.velocitypowered.api.proxy.player.PlayerSettings;
|
import com.velocitypowered.api.proxy.player.PlayerSettings;
|
||||||
@ -21,4 +22,12 @@ public final class PlayerSettingsChangedEvent {
|
|||||||
public PlayerSettings getPlayerSettings() {
|
public PlayerSettings getPlayerSettings() {
|
||||||
return playerSettings;
|
return playerSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return MoreObjects.toStringHelper(this)
|
||||||
|
.add("player", player)
|
||||||
|
.add("playerSettings", playerSettings)
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,9 @@ public final class ServerConnectedEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ServerConnectedEvent{" +
|
return "ServerConnectedEvent{"
|
||||||
"player=" + player +
|
+ "player=" + player
|
||||||
", server=" + server +
|
+ ", server=" + server
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,11 +43,11 @@ public final class ServerPreConnectEvent implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ServerPreConnectEvent{" +
|
return "ServerPreConnectEvent{"
|
||||||
"player=" + player +
|
+ "player=" + player
|
||||||
", originalServer=" + originalServer +
|
+ ", originalServer=" + originalServer
|
||||||
", result=" + result +
|
+ ", result=" + result
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,9 +31,9 @@ public final class ProxyPingEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ProxyPingEvent{" +
|
return "ProxyPingEvent{"
|
||||||
"connection=" + connection +
|
+ "connection=" + connection
|
||||||
", ping=" + ping +
|
+ ", ping=" + ping
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import java.net.InetAddress;
|
|||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This event is fired if proxy is getting queried over GS4 Query protocol
|
* This event is fired if proxy is getting queried over GS4 Query protocol.
|
||||||
*/
|
*/
|
||||||
public final class ProxyQueryEvent {
|
public final class ProxyQueryEvent {
|
||||||
|
|
||||||
@ -14,6 +14,13 @@ public final class ProxyQueryEvent {
|
|||||||
private final InetAddress querierAddress;
|
private final InetAddress querierAddress;
|
||||||
private QueryResponse response;
|
private QueryResponse response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new event.
|
||||||
|
*
|
||||||
|
* @param queryType the type of query
|
||||||
|
* @param querierAddress the remote address for the query
|
||||||
|
* @param response the current query response
|
||||||
|
*/
|
||||||
public ProxyQueryEvent(QueryType queryType, InetAddress querierAddress, QueryResponse response) {
|
public ProxyQueryEvent(QueryType queryType, InetAddress querierAddress, QueryResponse response) {
|
||||||
this.queryType = Preconditions.checkNotNull(queryType, "queryType");
|
this.queryType = Preconditions.checkNotNull(queryType, "queryType");
|
||||||
this.querierAddress = Preconditions.checkNotNull(querierAddress, "querierAddress");
|
this.querierAddress = Preconditions.checkNotNull(querierAddress, "querierAddress");
|
||||||
@ -21,7 +28,7 @@ public final class ProxyQueryEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get query type
|
* Returns the kind of query the remote client is performing.
|
||||||
*
|
*
|
||||||
* @return query type
|
* @return query type
|
||||||
*/
|
*/
|
||||||
@ -31,7 +38,7 @@ public final class ProxyQueryEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get querier address
|
* Get the address of the client that sent this query.
|
||||||
*
|
*
|
||||||
* @return querier address
|
* @return querier address
|
||||||
*/
|
*/
|
||||||
@ -41,9 +48,9 @@ public final class ProxyQueryEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get query response
|
* Returns the current query response.
|
||||||
*
|
*
|
||||||
* @return query response
|
* @return the current query response
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
public QueryResponse getResponse() {
|
public QueryResponse getResponse() {
|
||||||
@ -51,9 +58,9 @@ public final class ProxyQueryEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set query response
|
* Sets a new query response.
|
||||||
*
|
*
|
||||||
* @param response query response
|
* @param response the new non-null query response
|
||||||
*/
|
*/
|
||||||
public void setResponse(@NonNull QueryResponse response) {
|
public void setResponse(@NonNull QueryResponse response) {
|
||||||
this.response = Preconditions.checkNotNull(response, "response");
|
this.response = Preconditions.checkNotNull(response, "response");
|
||||||
@ -61,20 +68,20 @@ public final class ProxyQueryEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ProxyQueryEvent{" +
|
return "ProxyQueryEvent{"
|
||||||
"queryType=" + queryType +
|
+ "queryType=" + queryType
|
||||||
", querierAddress=" + querierAddress +
|
+ ", querierAddress=" + querierAddress
|
||||||
", response=" + response +
|
+ ", response=" + response
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of query
|
* Represents the type of query the client is asking for.
|
||||||
*/
|
*/
|
||||||
public enum QueryType {
|
public enum QueryType {
|
||||||
/**
|
/**
|
||||||
* Basic query asks only a subset of information, such as hostname, game type (hardcoded to
|
* Basic query asks only a subset of information, such as hostname, game type (hardcoded to
|
||||||
* <pre>MINECRAFT</pre>), map, current players, max players, proxy port and proxy hostname
|
* <pre>MINECRAFT</pre>), map, current players, max players, proxy port and proxy hostname.
|
||||||
*/
|
*/
|
||||||
BASIC,
|
BASIC,
|
||||||
|
|
||||||
@ -82,6 +89,6 @@ public final class ProxyQueryEvent {
|
|||||||
* Full query asks pretty much everything present on this event (only hardcoded values cannot be
|
* Full query asks pretty much everything present on this event (only hardcoded values cannot be
|
||||||
* modified here).
|
* modified here).
|
||||||
*/
|
*/
|
||||||
FULL;
|
FULL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,22 +16,22 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||||||
public enum Tristate {
|
public enum Tristate {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A value indicating a positive setting
|
* A value indicating a positive setting.
|
||||||
*/
|
*/
|
||||||
TRUE(true),
|
TRUE(true),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A value indicating a negative (negated) setting
|
* A value indicating a negative (negated) setting.
|
||||||
*/
|
*/
|
||||||
FALSE(false),
|
FALSE(false),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A value indicating a non-existent setting
|
* A value indicating a non-existent setting.
|
||||||
*/
|
*/
|
||||||
UNDEFINED(false);
|
UNDEFINED(false);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a {@link Tristate} from a boolean
|
* Returns a {@link Tristate} from a boolean.
|
||||||
*
|
*
|
||||||
* @param val the boolean value
|
* @param val the boolean value
|
||||||
* @return {@link #TRUE} or {@link #FALSE}, if the value is <code>true</code> or
|
* @return {@link #TRUE} or {@link #FALSE}, if the value is <code>true</code> or
|
||||||
|
@ -5,7 +5,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a dependency for a {@link Plugin}
|
* Indicates that the {@link Plugin} depends on another plugin in order to enable.
|
||||||
*/
|
*/
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target({})
|
@Target({})
|
||||||
@ -20,9 +20,10 @@ public @interface Dependency {
|
|||||||
String id();
|
String id();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If this dependency is optional for the plugin to work. By default this is {@code false}.
|
* Whether or not the dependency is not required to enable this plugin. By default this is
|
||||||
|
* {@code false}, meaning that the dependency is required to enable this plugin.
|
||||||
*
|
*
|
||||||
* @return true if the dependency is optional for the plugin to work
|
* @return true if the dependency is not required for the plugin to work
|
||||||
*/
|
*/
|
||||||
boolean optional() default false;
|
boolean optional() default false;
|
||||||
}
|
}
|
||||||
|
@ -13,9 +13,8 @@ import java.lang.annotation.Target;
|
|||||||
public @interface Plugin {
|
public @interface Plugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ID of the plugin. This ID should be unique as to not conflict with other plugins.
|
* 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}.
|
||||||
* The plugin ID must match the {@link PluginDescription#ID_PATTERN}.
|
|
||||||
*
|
*
|
||||||
* @return the ID for this plugin
|
* @return the ID for this plugin
|
||||||
*/
|
*/
|
||||||
|
@ -19,6 +19,12 @@ public final class PluginDependency {
|
|||||||
|
|
||||||
private final boolean optional;
|
private final boolean optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance.
|
||||||
|
* @param id the plugin ID
|
||||||
|
* @param version an optional version
|
||||||
|
* @param optional whether or not this dependency is optional
|
||||||
|
*/
|
||||||
public PluginDependency(String id, @Nullable String version, boolean optional) {
|
public PluginDependency(String id, @Nullable String version, boolean optional) {
|
||||||
this.id = checkNotNull(id, "id");
|
this.id = checkNotNull(id, "id");
|
||||||
checkArgument(!id.isEmpty(), "id cannot be empty");
|
checkArgument(!id.isEmpty(), "id cannot be empty");
|
||||||
@ -27,7 +33,7 @@ public final class PluginDependency {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the plugin ID of this {@link PluginDependency}
|
* Returns the plugin ID of this {@link PluginDependency}.
|
||||||
*
|
*
|
||||||
* @return the plugin ID
|
* @return the plugin ID
|
||||||
*/
|
*/
|
||||||
@ -62,9 +68,9 @@ public final class PluginDependency {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
PluginDependency that = (PluginDependency) o;
|
PluginDependency that = (PluginDependency) o;
|
||||||
return optional == that.optional &&
|
return optional == that.optional
|
||||||
Objects.equals(id, that.id) &&
|
&& Objects.equals(id, that.id)
|
||||||
Objects.equals(version, that.version);
|
&& Objects.equals(version, that.version);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -74,10 +80,10 @@ public final class PluginDependency {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "PluginDependency{" +
|
return "PluginDependency{"
|
||||||
"id='" + id + '\'' +
|
+ "id='" + id + '\''
|
||||||
", version='" + version + '\'' +
|
+ ", version='" + version + '\''
|
||||||
", optional=" + optional +
|
+ ", optional=" + optional
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
import net.kyori.text.Component;
|
import net.kyori.text.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a fluent interface to compose and send a connection request to another server behind the
|
* Provides a fluent interface to send a connection request to another server on the proxy. A
|
||||||
* proxy. A connection request is created using {@link Player#createConnectionRequest(RegisteredServer)}.
|
* connection request is created using {@link Player#createConnectionRequest(RegisteredServer)}.
|
||||||
*/
|
*/
|
||||||
public interface ConnectionRequestBuilder {
|
public interface ConnectionRequestBuilder {
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ public interface Player extends CommandSource, InboundConnection, ChannelMessage
|
|||||||
Optional<ServerConnection> getCurrentServer();
|
Optional<ServerConnection> getCurrentServer();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the player settings
|
* Returns the player's client settings.
|
||||||
*
|
*
|
||||||
* @return the settings
|
* @return the settings
|
||||||
*/
|
*/
|
||||||
@ -57,7 +57,7 @@ public interface Player extends CommandSource, InboundConnection, ChannelMessage
|
|||||||
Optional<ModInfo> getModInfo();
|
Optional<ModInfo> getModInfo();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current player's ping
|
* Returns the current player's ping.
|
||||||
*
|
*
|
||||||
* @return the player's ping or -1 if ping information is currently unknown
|
* @return the player's ping or -1 if ping information is currently unknown
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.velocitypowered.api.proxy.config;
|
package com.velocitypowered.api.proxy.config;
|
||||||
|
|
||||||
|
import com.velocitypowered.api.proxy.ProxyServer;
|
||||||
import com.velocitypowered.api.util.Favicon;
|
import com.velocitypowered.api.util.Favicon;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -7,54 +8,54 @@ import java.util.Optional;
|
|||||||
import net.kyori.text.Component;
|
import net.kyori.text.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides an interface to a proxy configuration
|
* Exposes certain proxy configuration information that plugins may use.
|
||||||
*/
|
*/
|
||||||
public interface ProxyConfig {
|
public interface ProxyConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether GameSpy 4 queries are accepted by the proxy
|
* Whether GameSpy 4 queries are accepted by the proxy.
|
||||||
*
|
*
|
||||||
* @return queries enabled
|
* @return queries enabled
|
||||||
*/
|
*/
|
||||||
boolean isQueryEnabled();
|
boolean isQueryEnabled();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the port GameSpy 4 queries are accepted on
|
* Get the port GameSpy 4 queries are accepted on.
|
||||||
*
|
*
|
||||||
* @return the query port
|
* @return the query port
|
||||||
*/
|
*/
|
||||||
int getQueryPort();
|
int getQueryPort();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the map name reported to GameSpy 4 query services
|
* Get the map name reported to GameSpy 4 query services.
|
||||||
*
|
*
|
||||||
* @return the map name
|
* @return the map name
|
||||||
*/
|
*/
|
||||||
String getQueryMap();
|
String getQueryMap();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether GameSpy 4 queries should show plugins installed on Velocity by default
|
* Whether GameSpy 4 queries should show plugins installed on Velocity by default.
|
||||||
*
|
*
|
||||||
* @return show plugins in query
|
* @return show plugins in query
|
||||||
*/
|
*/
|
||||||
boolean shouldQueryShowPlugins();
|
boolean shouldQueryShowPlugins();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the MOTD component shown in the tab list
|
* Get the MOTD component shown in the tab list.
|
||||||
*
|
*
|
||||||
* @return the motd component
|
* @return the motd component
|
||||||
*/
|
*/
|
||||||
Component getMotdComponent();
|
Component getMotdComponent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the maximum players shown in the tab list
|
* Get the maximum players shown in the tab list.
|
||||||
*
|
*
|
||||||
* @return max players
|
* @return max players
|
||||||
*/
|
*/
|
||||||
int getShowMaxPlayers();
|
int getShowMaxPlayers();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get whether the proxy is online mode. This determines if players are authenticated with Mojang
|
* Get whether the proxy is online mode. This determines if players are authenticated with Mojang.
|
||||||
* servers.
|
* servers.
|
||||||
*
|
*
|
||||||
* @return online mode enabled
|
* @return online mode enabled
|
||||||
@ -62,70 +63,72 @@ public interface ProxyConfig {
|
|||||||
boolean isOnlineMode();
|
boolean isOnlineMode();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a Map of all servers registered on this proxy
|
* Get a Map of all servers registered in <code>velocity.toml</code>. This method does
|
||||||
|
* <strong>not</strong> return all the servers currently in memory, although in most cases it
|
||||||
|
* does. For a view of all registered servers, see {@link ProxyServer#getAllServers()}.
|
||||||
*
|
*
|
||||||
* @return registered servers map
|
* @return registered servers map
|
||||||
*/
|
*/
|
||||||
Map<String, String> getServers();
|
Map<String, String> getServers();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the order of servers that players will be connected to
|
* Get the order of servers that players will be connected to.
|
||||||
*
|
*
|
||||||
* @return connection order list
|
* @return connection order list
|
||||||
*/
|
*/
|
||||||
List<String> getAttemptConnectionOrder();
|
List<String> getAttemptConnectionOrder();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get forced servers mapped to given virtual host
|
* Get forced servers mapped to a given virtual host.
|
||||||
*
|
*
|
||||||
* @return list of server names
|
* @return list of server names
|
||||||
*/
|
*/
|
||||||
Map<String, List<String>> getForcedHosts();
|
Map<String, List<String>> getForcedHosts();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the minimum compression threshold for packets
|
* Get the minimum compression threshold for packets.
|
||||||
*
|
*
|
||||||
* @return the compression threshold
|
* @return the compression threshold
|
||||||
*/
|
*/
|
||||||
int getCompressionThreshold();
|
int getCompressionThreshold();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the level of compression that packets will be compressed to
|
* Get the level of compression that packets will be compressed to.
|
||||||
*
|
*
|
||||||
* @return the compression level
|
* @return the compression level
|
||||||
*/
|
*/
|
||||||
int getCompressionLevel();
|
int getCompressionLevel();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the limit for how long a player must wait to log back in
|
* Get the limit for how long a player must wait to log back in.
|
||||||
*
|
*
|
||||||
* @return the login rate limit (in milliseconds)
|
* @return the login rate limit (in milliseconds)
|
||||||
*/
|
*/
|
||||||
int getLoginRatelimit();
|
int getLoginRatelimit();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the proxy favicon shown in the tablist
|
* Get the proxy favicon shown in the tablist.
|
||||||
*
|
*
|
||||||
* @return optional favicon
|
* @return optional favicon
|
||||||
*/
|
*/
|
||||||
Optional<Favicon> getFavicon();
|
Optional<Favicon> getFavicon();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get whether this proxy displays that it supports Forge/FML
|
* Get whether this proxy displays that it supports Forge/FML.
|
||||||
*
|
*
|
||||||
* @return forge announce enabled
|
* @return forge announce enabled
|
||||||
*/
|
*/
|
||||||
boolean isAnnounceForge();
|
boolean isAnnounceForge();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get how long this proxy will wait until performing a read timeout
|
* Get how long this proxy will wait for a connection to be established before timing it out.
|
||||||
*
|
*
|
||||||
* @return connection timeout (in milliseconds)
|
* @return connection timeout (in milliseconds)
|
||||||
*/
|
*/
|
||||||
int getConnectTimeout();
|
int getConnectTimeout();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get how long this proxy will wait until performing a read timeout
|
* Get how long this proxy will wait until performing a read timeout.
|
||||||
*
|
*
|
||||||
* @return read timeout (in milliseconds)
|
* @return read timeout (in milliseconds)
|
||||||
*/
|
*/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.velocitypowered.api.proxy.messages;
|
package com.velocitypowered.api.proxy.messages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a kind of channel identifier.
|
* Represents a kind of channel identifier for use with plugin messaging.
|
||||||
*/
|
*/
|
||||||
public interface ChannelIdentifier {
|
public interface ChannelIdentifier {
|
||||||
|
|
||||||
|
@ -7,14 +7,15 @@ package com.velocitypowered.api.proxy.messages;
|
|||||||
public interface ChannelRegistrar {
|
public interface ChannelRegistrar {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the specified message identifiers to listen on for the
|
* Registers the specified message identifiers to listen on so you can intercept plugin messages
|
||||||
|
* on the channel using {@link com.velocitypowered.api.event.connection.PluginMessageEvent}.
|
||||||
*
|
*
|
||||||
* @param identifiers the channel identifiers to register
|
* @param identifiers the channel identifiers to register
|
||||||
*/
|
*/
|
||||||
void register(ChannelIdentifier... identifiers);
|
void register(ChannelIdentifier... identifiers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unregisters the handler for the specified channel.
|
* Removes the intent to listen for the specified channel.
|
||||||
*
|
*
|
||||||
* @param identifiers the identifiers to unregister
|
* @param identifiers the identifiers to unregister
|
||||||
*/
|
*/
|
||||||
|
@ -72,8 +72,8 @@ public final class MinecraftChannelIdentifier implements ChannelIdentifier {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
MinecraftChannelIdentifier that = (MinecraftChannelIdentifier) o;
|
MinecraftChannelIdentifier that = (MinecraftChannelIdentifier) o;
|
||||||
return Objects.equals(namespace, that.namespace) &&
|
return Objects.equals(namespace, that.namespace)
|
||||||
Objects.equals(name, that.name);
|
&& Objects.equals(name, that.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -45,7 +45,9 @@ public interface TabListEntry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the latency for {@code this} entry.
|
* Returns the latency for {@code this} entry.
|
||||||
* <p>The icon shown in the tab list is calculated by the latency in the following way:<p>
|
*
|
||||||
|
* <p>The icon shown in the tab list is calculated by the latency as follows:</p>
|
||||||
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>A negative latency will display the no connection icon</li>
|
* <li>A negative latency will display the no connection icon</li>
|
||||||
* <li>0-150 will display 5 bars</li>
|
* <li>0-150 will display 5 bars</li>
|
||||||
@ -53,7 +55,6 @@ public interface TabListEntry {
|
|||||||
* <li>300-600 will display 3 bars</li>
|
* <li>300-600 will display 3 bars</li>
|
||||||
* <li>600-1000 will display 2 bars</li>
|
* <li>600-1000 will display 2 bars</li>
|
||||||
* <li>A latency move than 1 second will display 1 bar</li>
|
* <li>A latency move than 1 second will display 1 bar</li>
|
||||||
* <li></li>
|
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @return latency set for {@code this} entry
|
* @return latency set for {@code this} entry
|
||||||
@ -61,7 +62,7 @@ public interface TabListEntry {
|
|||||||
int getLatency();
|
int getLatency();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the latency for {@code this} entry to the specified value
|
* Sets the latency for {@code this} entry to the specified value.
|
||||||
*
|
*
|
||||||
* @param latency to changed to
|
* @param latency to changed to
|
||||||
* @return {@code this}, for chaining
|
* @return {@code this}, for chaining
|
||||||
@ -71,6 +72,7 @@ public interface TabListEntry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the game mode {@code this} entry has been set to.
|
* Gets the game mode {@code this} entry has been set to.
|
||||||
|
*
|
||||||
* <p>The number corresponds to the game mode in the following way:</p>
|
* <p>The number corresponds to the game mode in the following way:</p>
|
||||||
* <ol start="0">
|
* <ol start="0">
|
||||||
* <li>Survival</li>
|
* <li>Survival</li>
|
||||||
@ -142,7 +144,7 @@ public interface TabListEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the displayed name of the {@link TabListEntry}
|
* Sets the displayed name of the {@link TabListEntry}.
|
||||||
*
|
*
|
||||||
* @param displayName to set
|
* @param displayName to set
|
||||||
* @return {@code this}, for chaining
|
* @return {@code this}, for chaining
|
||||||
@ -154,7 +156,7 @@ public interface TabListEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the latency of the {@link TabListEntry}
|
* Sets the latency of the {@link TabListEntry}.
|
||||||
*
|
*
|
||||||
* @param latency to set
|
* @param latency to set
|
||||||
* @return {@code this}, for chaining
|
* @return {@code this}, for chaining
|
||||||
@ -166,7 +168,7 @@ public interface TabListEntry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the game mode of the {@link TabListEntry}
|
* Sets the game mode of the {@link TabListEntry}.
|
||||||
*
|
*
|
||||||
* @param gameMode to set
|
* @param gameMode to set
|
||||||
* @return {@code this}, for chaining
|
* @return {@code this}, for chaining
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.velocitypowered.api.proxy.server;
|
package com.velocitypowered.api.proxy.server;
|
||||||
|
|
||||||
|
import com.google.common.base.MoreObjects;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.velocitypowered.api.proxy.config.ProxyConfig;
|
import com.velocitypowered.api.proxy.config.ProxyConfig;
|
||||||
@ -7,6 +8,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||||
|
|
||||||
@ -90,7 +92,7 @@ public final class QueryResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get proxy (public facing) hostname
|
* Get proxy (public facing) hostname.
|
||||||
*
|
*
|
||||||
* @return proxy hostname
|
* @return proxy hostname
|
||||||
*/
|
*/
|
||||||
@ -99,7 +101,7 @@ public final class QueryResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get proxy (public facing) port
|
* Get proxy (public facing) port.
|
||||||
*
|
*
|
||||||
* @return proxy port
|
* @return proxy port
|
||||||
*/
|
*/
|
||||||
@ -136,7 +138,7 @@ public final class QueryResponse {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new {@link Builder} instance from data represented by this response
|
* Creates a new {@link Builder} instance from data represented by this response.
|
||||||
*
|
*
|
||||||
* @return {@link QueryResponse} builder
|
* @return {@link QueryResponse} builder
|
||||||
*/
|
*/
|
||||||
@ -155,7 +157,7 @@ public final class QueryResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new {@link Builder} instance
|
* Creates a new {@link Builder} instance.
|
||||||
*
|
*
|
||||||
* @return {@link QueryResponse} builder
|
* @return {@link QueryResponse} builder
|
||||||
*/
|
*/
|
||||||
@ -225,6 +227,11 @@ public final class QueryResponse {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the port where this proxy is running.
|
||||||
|
* @param proxyPort the port where the proxy is running
|
||||||
|
* @return this instance, for chaining
|
||||||
|
*/
|
||||||
public Builder proxyPort(int proxyPort) {
|
public Builder proxyPort(int proxyPort) {
|
||||||
Preconditions
|
Preconditions
|
||||||
.checkArgument(proxyPort >= 1 && proxyPort <= 65535, "proxyPort must be between 1-65535");
|
.checkArgument(proxyPort >= 1 && proxyPort <= 65535, "proxyPort must be between 1-65535");
|
||||||
@ -262,13 +269,19 @@ public final class QueryResponse {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears all currently set plugins.
|
||||||
|
*
|
||||||
|
* @return this builder, for chaining
|
||||||
|
*/
|
||||||
public Builder clearPlugins() {
|
public Builder clearPlugins() {
|
||||||
this.plugins.clear();
|
this.plugins.clear();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds new {@link QueryResponse} with supplied data
|
* Builds a new {@link QueryResponse} with the supplied data. The current instance can be reused
|
||||||
|
* after this method is called.
|
||||||
*
|
*
|
||||||
* @return response
|
* @return response
|
||||||
*/
|
*/
|
||||||
@ -289,37 +302,36 @@ public final class QueryResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Plugin information
|
* Represents a plugin in the query response.
|
||||||
*/
|
*/
|
||||||
public static class PluginInformation {
|
public static class PluginInformation {
|
||||||
|
|
||||||
private String name;
|
private final String name;
|
||||||
private String version;
|
private final @Nullable String version;
|
||||||
|
|
||||||
public PluginInformation(String name, String version) {
|
PluginInformation(String name, @Nullable String version) {
|
||||||
this.name = Preconditions.checkNotNull(name, "name");
|
this.name = Preconditions.checkNotNull(name, "name");
|
||||||
this.version = Preconditions.checkNotNull(version, "version");
|
this.version = version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setName(String name) {
|
public Optional<String> getVersion() {
|
||||||
this.name = name;
|
return Optional.ofNullable(version);
|
||||||
}
|
|
||||||
|
|
||||||
public void setVersion(@Nullable String version) {
|
|
||||||
this.version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
public String getVersion() {
|
|
||||||
return version;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PluginInformation of(String name, @Nullable String version) {
|
public static PluginInformation of(String name, @Nullable String version) {
|
||||||
return new PluginInformation(name, version);
|
return new PluginInformation(name, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return MoreObjects.toStringHelper(this)
|
||||||
|
.add("name", name)
|
||||||
|
.add("version", version)
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,10 +35,10 @@ public final class ServerInfo {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ServerInfo{" +
|
return "ServerInfo{"
|
||||||
"name='" + name + '\'' +
|
+ "name='" + name + '\''
|
||||||
", address=" + address +
|
+ ", address=" + address
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -50,8 +50,8 @@ public final class ServerInfo {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ServerInfo that = (ServerInfo) o;
|
ServerInfo that = (ServerInfo) o;
|
||||||
return Objects.equals(name, that.name) &&
|
return Objects.equals(name, that.name)
|
||||||
Objects.equals(address, that.address);
|
&& Objects.equals(address, that.address);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.velocitypowered.api.proxy.server;
|
package com.velocitypowered.api.proxy.server;
|
||||||
|
|
||||||
|
import com.google.common.base.MoreObjects;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.velocitypowered.api.util.Favicon;
|
import com.velocitypowered.api.util.Favicon;
|
||||||
@ -59,14 +60,18 @@ public final class ServerPing {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ServerPing{" +
|
return "ServerPing{"
|
||||||
"version=" + version +
|
+ "version=" + version
|
||||||
", players=" + players +
|
+ ", players=" + players
|
||||||
", description=" + description +
|
+ ", description=" + description
|
||||||
", favicon='" + favicon + '\'' +
|
+ ", favicon='" + favicon + '\''
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a copy of this {@link ServerPing} instance as a builder so that it can be modified.
|
||||||
|
* @return a copy of this instance as a {@link Builder}
|
||||||
|
*/
|
||||||
public Builder asBuilder() {
|
public Builder asBuilder() {
|
||||||
Builder builder = new Builder();
|
Builder builder = new Builder();
|
||||||
builder.version = version;
|
builder.version = version;
|
||||||
@ -171,6 +176,11 @@ public final class ServerPing {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uses the information from this builder to create a new {@link ServerPing} instance. The
|
||||||
|
* builder can be re-used after this event has been called.
|
||||||
|
* @return a new {@link ServerPing} instance
|
||||||
|
*/
|
||||||
public ServerPing build() {
|
public ServerPing build() {
|
||||||
if (this.version == null) {
|
if (this.version == null) {
|
||||||
throw new IllegalStateException("version not specified");
|
throw new IllegalStateException("version not specified");
|
||||||
@ -217,18 +227,18 @@ public final class ServerPing {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Builder{" +
|
return MoreObjects.toStringHelper(this)
|
||||||
"version=" + version +
|
.add("version", version)
|
||||||
", onlinePlayers=" + onlinePlayers +
|
.add("onlinePlayers", onlinePlayers)
|
||||||
", maximumPlayers=" + maximumPlayers +
|
.add("maximumPlayers", maximumPlayers)
|
||||||
", samplePlayers=" + samplePlayers +
|
.add("samplePlayers", samplePlayers)
|
||||||
", modType=" + modType +
|
.add("modType", modType)
|
||||||
", mods=" + mods +
|
.add("mods", mods)
|
||||||
", description=" + description +
|
.add("description", description)
|
||||||
", favicon=" + favicon +
|
.add("favicon", favicon)
|
||||||
", nullOutPlayers=" + nullOutPlayers +
|
.add("nullOutPlayers", nullOutPlayers)
|
||||||
", nullOutModinfo=" + nullOutModinfo +
|
.add("nullOutModinfo", nullOutModinfo)
|
||||||
'}';
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,9 +247,14 @@ public final class ServerPing {
|
|||||||
private final int protocol;
|
private final int protocol;
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance.
|
||||||
|
* @param protocol the protocol version as an integer
|
||||||
|
* @param name a friendly name for the protocol version
|
||||||
|
*/
|
||||||
public Version(int protocol, String name) {
|
public Version(int protocol, String name) {
|
||||||
this.protocol = protocol;
|
this.protocol = protocol;
|
||||||
this.name = name;
|
this.name = Preconditions.checkNotNull(name, "name");
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getProtocol() {
|
public int getProtocol() {
|
||||||
@ -252,10 +267,10 @@ public final class ServerPing {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Version{" +
|
return "Version{"
|
||||||
"protocol=" + protocol +
|
+ "protocol=" + protocol
|
||||||
", name='" + name + '\'' +
|
+ ", name='" + name + '\''
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,6 +280,12 @@ public final class ServerPing {
|
|||||||
private final int max;
|
private final int max;
|
||||||
private final List<SamplePlayer> sample;
|
private final List<SamplePlayer> sample;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new instance.
|
||||||
|
* @param online the number of online players
|
||||||
|
* @param max the maximum number of players
|
||||||
|
* @param sample a sample of players on the server
|
||||||
|
*/
|
||||||
public Players(int online, int max, List<SamplePlayer> sample) {
|
public Players(int online, int max, List<SamplePlayer> sample) {
|
||||||
this.online = online;
|
this.online = online;
|
||||||
this.max = max;
|
this.max = max;
|
||||||
@ -285,11 +306,11 @@ public final class ServerPing {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Players{" +
|
return "Players{"
|
||||||
"online=" + online +
|
+ "online=" + online
|
||||||
", max=" + max +
|
+ ", max=" + max
|
||||||
", sample=" + sample +
|
+ ", sample=" + sample
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,10 +334,10 @@ public final class ServerPing {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "SamplePlayer{" +
|
return "SamplePlayer{"
|
||||||
"name='" + name + '\'' +
|
+ "name='" + name + '\''
|
||||||
", id=" + id +
|
+ ", id=" + id
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,9 +59,9 @@ public final class Favicon {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Favicon{" +
|
return "Favicon{"
|
||||||
"base64Url='" + base64Url + '\'' +
|
+ "base64Url='" + base64Url + '\''
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,9 +72,8 @@ public final class Favicon {
|
|||||||
*/
|
*/
|
||||||
public static Favicon create(BufferedImage image) {
|
public static Favicon create(BufferedImage image) {
|
||||||
Preconditions.checkNotNull(image, "image");
|
Preconditions.checkNotNull(image, "image");
|
||||||
Preconditions
|
Preconditions.checkArgument(image.getWidth() == 64 && image.getHeight() == 64,
|
||||||
.checkArgument(image.getWidth() == 64 && image.getHeight() == 64, "Image does not have" +
|
"Image is not 64x64(found %sx%s)", image.getWidth(), image.getHeight());
|
||||||
" 64x64 dimensions (found %sx%s)", image.getWidth(), image.getHeight());
|
|
||||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
try {
|
try {
|
||||||
ImageIO.write(image, "PNG", os);
|
ImageIO.write(image, "PNG", os);
|
||||||
|
@ -50,11 +50,11 @@ public final class GameProfile {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "GameProfile{" +
|
return "GameProfile{"
|
||||||
"id='" + id + '\'' +
|
+ "id='" + id + '\''
|
||||||
", name='" + name + '\'' +
|
+ ", name='" + name + '\''
|
||||||
", properties=" + properties +
|
+ ", properties=" + properties
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final class Property {
|
public static final class Property {
|
||||||
@ -83,11 +83,11 @@ public final class GameProfile {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Property{" +
|
return "Property{"
|
||||||
"name='" + name + '\'' +
|
+ "name='" + name + '\''
|
||||||
", value='" + value + '\'' +
|
+ ", value='" + value + '\''
|
||||||
", signature='" + signature + '\'' +
|
+ ", signature='" + signature + '\''
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,10 +26,10 @@ public final class ModInfo {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ModInfo{" +
|
return "ModInfo{"
|
||||||
"type='" + type + '\'' +
|
+ "type='" + type + '\''
|
||||||
", modList=" + modList +
|
+ ", modList=" + modList
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final class Mod {
|
public static final class Mod {
|
||||||
@ -52,10 +52,10 @@ public final class ModInfo {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Mod{" +
|
return "Mod{"
|
||||||
"id='" + id + '\'' +
|
+ "id='" + id + '\''
|
||||||
", version='" + version + '\'' +
|
+ ", version='" + version + '\''
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -13,6 +13,13 @@ public final class ProxyVersion {
|
|||||||
private final String vendor;
|
private final String vendor;
|
||||||
private final String version;
|
private final String version;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new {@link ProxyVersion} instance.
|
||||||
|
*
|
||||||
|
* @param name the name for the proxy implementation
|
||||||
|
* @param vendor the vendor for the proxy implementation
|
||||||
|
* @param version the version for the proxy implementation
|
||||||
|
*/
|
||||||
public ProxyVersion(String name, String vendor, String version) {
|
public ProxyVersion(String name, String vendor, String version) {
|
||||||
this.name = Preconditions.checkNotNull(name, "name");
|
this.name = Preconditions.checkNotNull(name, "name");
|
||||||
this.vendor = Preconditions.checkNotNull(vendor, "vendor");
|
this.vendor = Preconditions.checkNotNull(vendor, "vendor");
|
||||||
@ -40,9 +47,9 @@ public final class ProxyVersion {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ProxyVersion that = (ProxyVersion) o;
|
ProxyVersion that = (ProxyVersion) o;
|
||||||
return Objects.equals(name, that.name) &&
|
return Objects.equals(name, that.name)
|
||||||
Objects.equals(vendor, that.vendor) &&
|
&& Objects.equals(vendor, that.vendor)
|
||||||
Objects.equals(version, that.version);
|
&& Objects.equals(version, that.version);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -52,10 +59,10 @@ public final class ProxyVersion {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ProxyVersion{" +
|
return "ProxyVersion{"
|
||||||
"name='" + name + '\'' +
|
+ "name='" + name + '\''
|
||||||
", vendor='" + vendor + '\'' +
|
+ ", vendor='" + vendor + '\''
|
||||||
", version='" + version + '\'' +
|
+ ", version='" + version + '\''
|
||||||
'}';
|
+ '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,8 +38,10 @@ public final class UuidUtils {
|
|||||||
*/
|
*/
|
||||||
public static String toUndashed(final UUID uuid) {
|
public static String toUndashed(final UUID uuid) {
|
||||||
Preconditions.checkNotNull(uuid, "uuid");
|
Preconditions.checkNotNull(uuid, "uuid");
|
||||||
return Strings.padStart(Long.toHexString(uuid.getMostSignificantBits()), 16, '0') +
|
String msbStr = Long.toHexString(uuid.getMostSignificantBits());
|
||||||
Strings.padStart(Long.toHexString(uuid.getLeastSignificantBits()), 16, '0');
|
String lsbStr = Long.toHexString(uuid.getLeastSignificantBits());
|
||||||
|
return Strings.padStart(msbStr, 16, '0') + Strings.padStart(lsbStr,
|
||||||
|
16, '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.velocitypowered.api.util.title;
|
package com.velocitypowered.api.util.title;
|
||||||
|
|
||||||
|
import com.google.common.base.MoreObjects;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@ -110,24 +111,24 @@ public final class TextTitle implements Title {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
TextTitle textTitle = (TextTitle) o;
|
TextTitle textTitle = (TextTitle) o;
|
||||||
return stay == textTitle.stay &&
|
return stay == textTitle.stay
|
||||||
fadeIn == textTitle.fadeIn &&
|
&& fadeIn == textTitle.fadeIn
|
||||||
fadeOut == textTitle.fadeOut &&
|
&& fadeOut == textTitle.fadeOut
|
||||||
resetBeforeSend == textTitle.resetBeforeSend &&
|
&& resetBeforeSend == textTitle.resetBeforeSend
|
||||||
Objects.equals(title, textTitle.title) &&
|
&& Objects.equals(title, textTitle.title)
|
||||||
Objects.equals(subtitle, textTitle.subtitle);
|
&& Objects.equals(subtitle, textTitle.subtitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "TextTitle{" +
|
return MoreObjects.toStringHelper(this)
|
||||||
"title=" + title +
|
.add("title", title)
|
||||||
", subtitle=" + subtitle +
|
.add("subtitle", subtitle)
|
||||||
", stay=" + stay +
|
.add("stay", stay)
|
||||||
", fadeIn=" + fadeIn +
|
.add("fadeIn", fadeIn)
|
||||||
", fadeOut=" + fadeOut +
|
.add("fadeOut", fadeOut)
|
||||||
", resetBeforeSend=" + resetBeforeSend +
|
.add("resetBeforeSend", resetBeforeSend)
|
||||||
'}';
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -238,14 +239,14 @@ public final class TextTitle implements Title {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Builder{" +
|
return MoreObjects.toStringHelper(this)
|
||||||
"title=" + title +
|
.add("title", title)
|
||||||
", subtitle=" + subtitle +
|
.add("subtitle", subtitle)
|
||||||
", stay=" + stay +
|
.add("stay", stay)
|
||||||
", fadeIn=" + fadeIn +
|
.add("fadeIn", fadeIn)
|
||||||
", fadeOut=" + fadeOut +
|
.add("fadeOut", fadeOut)
|
||||||
", resetBeforeSend=" + resetBeforeSend +
|
.add("resetBeforeSend", resetBeforeSend)
|
||||||
'}';
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren