Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Fix API breaking change, deprecate ProxyAudience
Dieser Commit ist enthalten in:
Ursprung
70a989e955
Commit
8ef2835a47
@ -2,7 +2,9 @@ package com.velocitypowered.api.command;
|
||||
|
||||
import com.velocitypowered.api.permission.PermissionSubject;
|
||||
import com.velocitypowered.api.proxy.ProxyAudience;
|
||||
import com.velocitypowered.api.util.AdventureCompat;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
/**
|
||||
* Represents something that can be used to run a {@link Command}.
|
||||
@ -17,4 +19,9 @@ public interface CommandSource extends PermissionSubject, ProxyAudience {
|
||||
*/
|
||||
@Deprecated
|
||||
void sendMessage(net.kyori.text.Component component);
|
||||
|
||||
@Override
|
||||
default void sendMessage(@NonNull Component message) {
|
||||
this.sendMessage(AdventureCompat.asOriginalTextComponent(message));
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,10 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
* Indicates an {@link Audience} that is on the proxy. This interface contains no-op default methods
|
||||
* that are used to bridge compatibility issues with the new adventure API. This interface will go
|
||||
* away in Velocity 2.0.0.
|
||||
*
|
||||
* @deprecated Only used to handle compatibility problems, will go away in Velocity 2.0.0
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ProxyAudience extends Audience {
|
||||
|
||||
@Override
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren