3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +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.key.Keyed;
import net.kyori.adventure.pointer.Pointers; import net.kyori.adventure.pointer.Pointers;
import net.kyori.adventure.text.Component; 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.ClickEvent;
import net.kyori.adventure.text.event.HoverEvent; import net.kyori.adventure.text.event.HoverEvent;
import net.kyori.adventure.text.event.HoverEventSource; 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. * Represents a player who is connected to the proxy.
*/ */
public interface Player extends CommandSource, Identified, InboundConnection, public interface Player extends CommandSource, Identified, InboundConnection,
ChannelMessageSource, ChannelMessageSink, HoverEventSource<HoverEvent.ShowEntity>, ChannelMessageSource, ChannelMessageSink, HoverEventSource<HoverEvent.ShowEntity>, Keyed {
ComponentLike, Keyed {
/** /**
* Returns the player's current username. * Returns the player's current username.
@ -300,7 +298,6 @@ public interface Player extends CommandSource, Identified, InboundConnection,
return Key.key("player"); return Key.key("player");
} }
@Override
default @NotNull Component asComponent() { default @NotNull Component asComponent() {
return Component.text(getUsername()).hoverEvent(this) return Component.text(getUsername()).hoverEvent(this)
.clickEvent(ClickEvent.suggestCommand("/tell " + getUsername())) .clickEvent(ClickEvent.suggestCommand("/tell " + getUsername()))