Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* The result of a command invocation attempt.
*/
public enum CommandResult {

/**
* The command was successfully executed by the proxy.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public record InvocationInfo(SignedState signedState, Source source) {
* @since 3.4.0
*/
public enum SignedState {

/**
* Indicates that the command was executed from a signed source with signed message arguments,
* This is currently only possible by typing a command in chat with signed arguments.
Expand Down Expand Up @@ -158,6 +159,7 @@ public enum SignedState {
* @since 3.4.0
*/
public enum Source {

/**
* Indicates that the command was invoked by a player.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ public static PreLoginComponentResult denied(net.kyori.adventure.text.Component
}

private enum Result {

ALLOWED,
FORCE_ONLINE,
FORCE_OFFLINE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
@AwaitingEvent
@ApiStatus.Experimental
public final class PreTransferEvent implements ResultedEvent<PreTransferEvent.TransferResult> {

private final InetSocketAddress originalAddress;
private final Player player;
private TransferResult result = TransferResult.ALLOWED;
Expand Down Expand Up @@ -56,6 +57,7 @@ public void setResult(final TransferResult result) {
* Transfer Result of a player to another host.
*/
public static class TransferResult implements ResultedEvent.Result {

private static final TransferResult ALLOWED = new TransferResult(true, null);
private static final TransferResult DENIED = new TransferResult(false, null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* not wait on the result of this event.
*/
public final class PlayerClientBrandEvent {

private final Player player;
private final String brand;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public String toString() {
* Represents the possible statuses for the resource pack.
*/
public enum Status {

/**
* The resource pack was applied successfully.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
*/
@AwaitingEvent
public class ServerLoginPluginMessageEvent implements ResultedEvent<ResponseResult> {

private final ServerConnection connection;
private final ChannelIdentifier identifier;
private final byte[] contents;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* firing.
*/
public class ServerPostConnectEvent {

private final Player player;
private final RegisteredServer previousServer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/
@AwaitingEvent
public class ServerResourcePackSendEvent implements ResultedEvent<ResultedEvent.GenericResult> {

private GenericResult result;
private final ResourcePackInfo receivedResourcePack;
private ResourcePackInfo providedResourcePack;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
@AwaitingEvent
public class TabCompleteEvent {

private final Player player;
private final String partialMessage;
private final List<String> suggestions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @since 3.3.0
*/
public record ServerRegisteredEvent(@NotNull RegisteredServer registeredServer) {

public ServerRegisteredEvent {
Preconditions.checkNotNull(registeredServer, "registeredServer");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @since 3.3.0
*/
public record ServerUnregisteredEvent(@NotNull RegisteredServer unregisteredServer) {

public ServerUnregisteredEvent {
Preconditions.checkNotNull(unregisteredServer, "unregisteredServer");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public String toString() {
* Represents the type of query the client is asking for.
*/
public enum QueryType {

/**
* 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Represents the ClientIntent of a client in the Handshake state.
*/
public enum HandshakeIntent {

STATUS(1),
LOGIN(2),
TRANSFER(3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Represents each listener type.
*/
public enum ListenerType {

MINECRAFT("Minecraft"),
QUERY("Query");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* @since 3.3.0
*/
public enum ProtocolState {

/**
* Initial connection State.
* <p>This status can be caused by a {@link HandshakeIntent#STATUS},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Represents each Minecraft protocol version.
*/
public enum ProtocolVersion implements Ordered<ProtocolVersion> {

UNKNOWN(-1, "Unknown") {
@Override
public boolean isUnknown() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ default boolean isSuccessful() {
* Represents the status of a connection request initiated by a {@link ConnectionRequestBuilder}.
*/
enum Status {

/**
* The player was successfully connected to the server.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public interface IdentifiedKey extends KeySigned {
* The different versions of player keys, per Minecraft version.
*/
enum Revision implements Ordered<Revision> {

GENERIC_V1(ImmutableSet.of(), ImmutableSet.of(ProtocolVersion.MINECRAFT_1_19)),
LINKED_V2(ImmutableSet.of(), ImmutableSet.of(ProtocolVersion.MINECRAFT_1_19_1));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Represents a chat session held by a player.
*/
public interface ChatSession extends KeyIdentifiable {

/**
* Returns the {@link UUID} of the session.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public interface PlayerSettings {
* The client's current chat display mode.
*/
enum ChatMode {

SHOWN,
COMMANDS_ONLY,
HIDDEN
Expand All @@ -95,6 +96,7 @@ enum ChatMode {
* The player's selected dominant hand.
*/
enum MainHand {

LEFT,
RIGHT
}
Expand All @@ -103,6 +105,7 @@ enum MainHand {
* The client's current "Particles" option state.
*/
enum ParticleStatus {

ALL,
DECREASED,
MINIMAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ interface Builder {
* Represents the origin of the resource-pack.
*/
enum Origin {

/**
* Resource-pack originated from the downstream server.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* Represents a single entry in a {@link TabList}.
*/
public interface TabListEntry extends KeyIdentifiable {

/**
* Returns the {@link ChatSession} associated with this entry.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* @see RegisteredServer#ping(PingOptions)
*/
public final class PingOptions {

/**
* Default PingOptions.
*/
Expand Down Expand Up @@ -107,6 +108,7 @@ public String toString() {
* @since 3.2.0
*/
public static final class Builder implements AbstractBuilder<PingOptions> {

private ProtocolVersion protocolVersion = ProtocolVersion.UNKNOWN;
private long timeout = 0;
private String virtualHost = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ public String toString() {
* A builder for {@link QueryResponse} objects.
*/
public static final class Builder {

private @MonotonicNonNull String hostname;
private @MonotonicNonNull String gameVersion;
private @MonotonicNonNull String map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Enumerates all possible task statuses.
*/
public enum TaskStatus {

/**
* The task is scheduled and is currently running.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Represents where a chat message is going to be sent.
*/
public enum MessagePosition {

/**
* The chat message will appear in the client's HUD. These messages can be filtered out by the
* client.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public URI getUrl() {
* @apiNote {@link Type#BUG_REPORT} links are shown on the connection error screen
*/
public enum Type {

BUG_REPORT,
COMMUNITY_GUIDELINES,
SUPPORT,
Expand Down
Loading