gradle time
This commit is contained in:
parent
7040a6ce1e
commit
9421ef511e
47 changed files with 482 additions and 226 deletions
|
|
@ -1,14 +1,19 @@
|
|||
package de.kentoj.scrow.velocity;
|
||||
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import de.kentoj.kencommandapi.CommandAPI;
|
||||
import de.kentoj.scrowlib.instancemanager.InstanceManager;
|
||||
import de.kentoj.scrowlib.messaging.MessageBroker;
|
||||
import de.kentoj.scrowlib.player.NetworkPlayer;
|
||||
import de.kentoj.scrowlib.player.NetworkPlayerFactory;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.jdbi.v3.core.Jdbi;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@NoArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public class ScrowAPI {
|
||||
|
||||
|
|
@ -20,6 +25,16 @@ public class ScrowAPI {
|
|||
private static MessageBroker messageBroker;
|
||||
@Getter
|
||||
private static InstanceManager instanceManager;
|
||||
private static NetworkPlayerFactory playerFactory;
|
||||
|
||||
public static NetworkPlayer getPlayer(Player player) {
|
||||
return getPlayer(player.getUniqueId());
|
||||
}
|
||||
|
||||
public static NetworkPlayer getPlayer(UUID uuid) {
|
||||
return playerFactory.create(uuid);
|
||||
}
|
||||
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static void setCommandApi(CommandAPI commandApi) {
|
||||
|
|
@ -40,5 +55,10 @@ public class ScrowAPI {
|
|||
public static void setJdbi(Jdbi jdbi) {
|
||||
ScrowAPI.jdbi = jdbi;
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static void setPlayerFactory(NetworkPlayerFactory playerFactory) {
|
||||
ScrowAPI.playerFactory = playerFactory;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue