3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00

Remove ComponentLike interface from Player

Dieser Commit ist enthalten in:
lexikiq 2021-06-11 22:06:37 -04:00
Ursprung 19f80bd618
Commit 39d39e58bd
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: AE6C11E94FDBB116

Datei anzeigen

@ -30,7 +30,6 @@ import net.kyori.adventure.key.Key;
import net.kyori.adventure.key.Keyed;
import net.kyori.adventure.pointer.Pointers;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.ComponentLike;
import net.kyori.adventure.text.event.ClickEvent;
import net.kyori.adventure.text.event.HoverEvent;
import net.kyori.adventure.text.event.HoverEventSource;
@ -41,8 +40,7 @@ import org.jetbrains.annotations.NotNull;
* Represents a player who is connected to the proxy.
*/
public interface Player extends CommandSource, Identified, InboundConnection,
ChannelMessageSource, ChannelMessageSink, HoverEventSource<HoverEvent.ShowEntity>,
ComponentLike, Keyed {
ChannelMessageSource, ChannelMessageSink, HoverEventSource<HoverEvent.ShowEntity>, Keyed {
/**
* Returns the player's current username.
@ -300,7 +298,6 @@ public interface Player extends CommandSource, Identified, InboundConnection,
return Key.key("player");
}
@Override
default @NotNull Component asComponent() {
return Component.text(getUsername()).hoverEvent(this)
.clickEvent(ClickEvent.suggestCommand("/tell " + getUsername()))