mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2026-04-08 16:10:26 +00:00
more changes
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
description = "Api functions for valiobungee"
|
||||
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
plugins {
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
description = "Api functions for valiobungee"
|
||||
|
||||
dependencies {
|
||||
testImplementation(libs.testing.juipter)
|
||||
}
|
||||
@@ -14,3 +12,12 @@ tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package net.limework.valiobungee.api.entity;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Network player.
|
||||
*
|
||||
@@ -24,13 +22,18 @@ import java.util.UUID;
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public interface NetworkPlayer {
|
||||
/**
|
||||
* @return player unique id
|
||||
*/
|
||||
UUID getUUID();
|
||||
|
||||
/**
|
||||
* @return proxy player on
|
||||
*/
|
||||
NetworkProxy getProxy();
|
||||
|
||||
/**
|
||||
* @return true when player is on the same proxy
|
||||
*/
|
||||
boolean isLocal();
|
||||
|
||||
/**
|
||||
* @return true when a player is online on the network
|
||||
*/
|
||||
boolean isOnline();
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public interface NetworkProxy {
|
||||
Set<NetworkPlayer> getProxyPlayers();
|
||||
|
||||
/**
|
||||
* @return returns true if this object is proxy on it
|
||||
* @return returns true if this NetworkProxy is the same proxy
|
||||
*/
|
||||
boolean isMe();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2026 ValioBungee contributors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package net.limework.valiobungee.api.entity;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Network player. that uses UUID as an ID
|
||||
*
|
||||
* @author Ham1255
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public interface UUIDPlayer {
|
||||
/**
|
||||
* @return player unique id
|
||||
*/
|
||||
UUID getUniqueId();
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
@@ -10,10 +9,6 @@ dependencies {
|
||||
|
||||
description = "ValioBungee Velocity API"
|
||||
|
||||
java {
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<Javadoc> {
|
||||
@@ -27,17 +22,6 @@ tasks {
|
||||
val apiDocs = File(rootProject.projectDir, "api/build/docs/javadoc")
|
||||
//options.linksOffline("https://ci.limework.net/ValioBungee/api/build/docs/javadoc", apiDocs.path)
|
||||
}
|
||||
compileJava {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
options.release.set(21) // required by velocity
|
||||
}
|
||||
javadoc {
|
||||
options.encoding = Charsets.UTF_8.name()
|
||||
}
|
||||
processResources {
|
||||
filteringCharset = Charsets.UTF_8.name()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
||||
@@ -15,12 +15,21 @@
|
||||
*/
|
||||
package net.limework.valiobungee.velocity.api.entities;
|
||||
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import java.util.Optional;
|
||||
import net.limework.valiobungee.api.entity.NetworkPlayer;
|
||||
import net.limework.valiobungee.api.entity.UUIDPlayer;
|
||||
|
||||
/**
|
||||
* Velocity Network player.
|
||||
* Velocity Network player. hold specific stuff for velocity platform
|
||||
*
|
||||
* @author Ham1255
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public interface VelocityNetworkPlayer extends NetworkPlayer {}
|
||||
public interface VelocityNetworkPlayer extends NetworkPlayer, UUIDPlayer {
|
||||
|
||||
/**
|
||||
* @return an optional that contains a player if he is on the same proxy
|
||||
*/
|
||||
Optional<Player> getHandle();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user