sync with remote
This commit is contained in:
@@ -13,4 +13,12 @@ dependencies {
|
||||
implementation(kotlin("stdlib"))
|
||||
@Suppress("VulnerableLibrariesLocal")
|
||||
compileOnly("io.github.waterfallmc:waterfall-api:1.19-R0.1-SNAPSHOT")
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
val release by getting(MavenPublication::class) {
|
||||
artifact(tasks.jar)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,17 +2,20 @@ package cc.maxmc.msm.api;
|
||||
|
||||
import cc.maxmc.msm.api.misc.ServerInfo;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("unused") // API
|
||||
public interface MultiServerManAPI {
|
||||
ServerInfo getServer(String type, List<ProxiedPlayer> players);
|
||||
@NotNull
|
||||
ServerInfo getServer(@NotNull String type, @NotNull List<ProxiedPlayer> players);
|
||||
|
||||
void informEnd(int id);
|
||||
|
||||
ServerInfo getPlayerServer(ProxiedPlayer player);
|
||||
@NotNull
|
||||
ServerInfo getPlayerServer(@NotNull ProxiedPlayer player);
|
||||
|
||||
Boolean containPlayer(ProxiedPlayer player);
|
||||
Boolean containPlayer(@NotNull ProxiedPlayer player);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package cc.maxmc.msm.api.misc
|
||||
|
||||
enum class EnumAPI {
|
||||
GET_SERVER,
|
||||
INFORM_END,
|
||||
GET_PLAYER_SERVER,
|
||||
CONTAIN_PLAYER;
|
||||
}
|
||||
@@ -9,6 +9,11 @@ public class ServerInfo {
|
||||
private final HostAndPort server;
|
||||
private final int id;
|
||||
|
||||
public ServerInfo() {
|
||||
server = HostAndPort.fromString("127.0.0.1");
|
||||
id = -1;
|
||||
}
|
||||
|
||||
public ServerInfo(@Nullable HostAndPort server, int id) {
|
||||
this.server = server;
|
||||
this.id = id;
|
||||
|
||||
Reference in New Issue
Block a user