An educated guess to fix Git branch

This commit is contained in:
Camotoy 2022-09-18 15:40:44 -04:00
parent f71fa9ccac
commit 44e60b7ad8
No known key found for this signature in database
GPG key ID: 7EEFB66FE798081F
7 changed files with 18 additions and 6 deletions

View file

@ -4,4 +4,5 @@ dependencies {
exclude(group = "com.google.guava", module = "guava")
exclude(group = "org.lanternpowered", module = "lmbda")
}
compileOnlyApi("org.jetbrains", "annotations", "23.0.0")
}

View file

@ -25,13 +25,14 @@
package org.geysermc.geyser.api.command;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Handles executing a command.
*
* @param <T> the command source
*/
public interface CommandExecutor<T extends CommandSource> {
/**
* Executes the given {@link Command} with the given
* {@link CommandSource}.
@ -40,5 +41,5 @@ public interface CommandExecutor<T extends CommandSource> {
* @param command the command
* @param args the arguments
*/
void execute(T source, Command command, String[] args);
void execute(@NonNull T source, @NonNull Command command, @NonNull String[] args);
}

View file

@ -25,6 +25,8 @@
package org.geysermc.geyser.api.command;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Represents an instance capable of sending commands.
*/
@ -42,7 +44,7 @@ public interface CommandSource {
*
* @param message the message to send
*/
void sendMessage(String message);
void sendMessage(@NonNull String message);
/**
* Sends the given messages to the command source
@ -58,7 +60,7 @@ public interface CommandSource {
/**
* If this source is the console.
*
* @return true if this source is the console
* @return true if this source is the console
*/
boolean isConsole();

View file

@ -25,6 +25,7 @@
package org.geysermc.geyser.api.event;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.geysermc.geyser.api.GeyserApi;
/**
@ -39,7 +40,8 @@ public interface EventRegistrar {
* @param object the object to wrap around
* @return an event registrar instance
*/
static EventRegistrar of(Object object) {
@NonNull
static EventRegistrar of(@NonNull Object object) {
return GeyserApi.api().provider(EventRegistrar.class, object);
}
}

View file

@ -25,6 +25,8 @@
package org.geysermc.geyser.api.network;
import org.checkerframework.checker.nullness.qual.NonNull;
/**
* The listener that handles connections from Minecraft:
* Bedrock Edition.
@ -37,6 +39,7 @@ public interface BedrockListener {
*
* @return the listening address
*/
@NonNull
String address();
/**

View file

@ -25,6 +25,8 @@
package org.geysermc.geyser.api.network;
import org.jetbrains.annotations.NotNull;
/**
* Represents the Java server that Geyser is connecting to.
*/
@ -63,5 +65,6 @@ public interface RemoteServer {
*
* @return the auth type required by the remote server
*/
@NotNull
AuthType authType();
}

View file

@ -84,7 +84,7 @@ configure<BlossomExtension> {
val mainFile = "src/main/java/org/geysermc/geyser/GeyserImpl.java"
// On Jenkins, a detached head is checked out, so indra cannot determine the branch. Fortunately, this environment variable is available.
val branchName = indra.branchName() ?: System.getenv("GIT_BRANCH") ?: "DEV"
val branchName = indra.branchName() ?: System.getenv("BRANCH") ?: "DEV"
val commit = indra.commit()
val git = indra.git()
val gitVersion = "git-${branchName}-${commit?.name?.substring(0, 7) ?: "0000000"}"