add kick-kicked-players
This commit is contained in:
+6
@@ -6,6 +6,7 @@ import net.kyori.adventure.sound.Sound;
|
||||
import net.kyori.adventure.sound.SoundStop;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.ComponentLike;
|
||||
import net.kyori.adventure.text.serializer.bungeecord.BungeeComponentSerializer;
|
||||
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||
import net.kyori.adventure.title.Title;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
@@ -136,6 +137,11 @@ public class BungeePlayer implements AdaptedPlayer, Audience {
|
||||
return handle.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void kick(Component reason) {
|
||||
handle.disconnect(BungeeComponentSerializer.get().serialize(reason));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getPermissions() {
|
||||
return new ArrayList<>(handle.getPermissions());
|
||||
|
||||
+5
@@ -174,6 +174,11 @@ public class VelocityPlayer implements AdaptedPlayer, Audience {
|
||||
return handle.getUsername();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void kick(Component reason) {
|
||||
handle.disconnect(reason);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getPermissions() {
|
||||
throw new IllegalStateException("AdaptedPlayer#getPermissions cannot be used on velocity");
|
||||
|
||||
Reference in New Issue
Block a user