mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-25 12:25:15 +01:00
Fix compile
This commit is contained in:
parent
f285669990
commit
916be86fbf
@ -26,11 +26,13 @@ import com.discordsrv.common.player.IPlayer;
|
||||
import com.discordsrv.common.player.provider.model.SkinInfo;
|
||||
import net.kyori.adventure.identity.Identity;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class BungeePlayer extends BungeeCommandSender implements IPlayer {
|
||||
|
||||
@ -53,6 +55,12 @@ public class BungeePlayer extends BungeeCommandSender implements IPlayer {
|
||||
return commandSender.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Void> kick(Component component) {
|
||||
player.disconnect(BungeeComponentSerializer.get().serialize(component));
|
||||
return CompletableFuture.completedFuture(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable SkinInfo skinInfo() {
|
||||
return null;
|
||||
|
@ -92,6 +92,11 @@ public class MinecraftToDiscordChatMessageTest {
|
||||
return "Vankka";
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Void> kick(Component component) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable SkinInfo skinInfo() {
|
||||
return null;
|
||||
|
@ -32,6 +32,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class VelocityPlayer extends VelocityCommandSender implements IPlayer {
|
||||
|
||||
@ -52,6 +53,12 @@ public class VelocityPlayer extends VelocityCommandSender implements IPlayer {
|
||||
return player.getUsername();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Void> kick(Component component) {
|
||||
player.disconnect(component);
|
||||
return CompletableFuture.completedFuture(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable SkinInfo skinInfo() {
|
||||
for (GameProfile.Property property : player.getGameProfile().getProperties()) {
|
||||
|
Loading…
Reference in New Issue
Block a user