Remove remaining deprecated APIs
This commit is contained in:
@@ -69,33 +69,6 @@ public interface CommandManager {
|
||||
*/
|
||||
void unregister(String alias);
|
||||
|
||||
/**
|
||||
* Attempts to execute a command from the given {@code cmdLine} in
|
||||
* a blocking fashion.
|
||||
*
|
||||
* @param source the source to execute the command for
|
||||
* @param cmdLine the command to run
|
||||
* @return {@code true} if the command was found and executed
|
||||
* @deprecated this method blocks the current thread during the event call and
|
||||
* the command execution. Prefer {@link #executeAsync(CommandSource, String)}
|
||||
* instead.
|
||||
*/
|
||||
@Deprecated
|
||||
boolean execute(CommandSource source, String cmdLine);
|
||||
|
||||
/**
|
||||
* Attempts to execute a command from the given {@code cmdLine} without
|
||||
* firing a {@link CommandExecuteEvent} in a blocking fashion.
|
||||
*
|
||||
* @param source the source to execute the command for
|
||||
* @param cmdLine the command to run
|
||||
* @return {@code true} if the command was found and executed
|
||||
* @deprecated this methods blocks the current thread during the command execution.
|
||||
* Prefer {@link #executeImmediatelyAsync(CommandSource, String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
boolean executeImmediately(CommandSource source, String cmdLine);
|
||||
|
||||
/**
|
||||
* Attempts to asynchronously execute a command from the given {@code cmdLine}.
|
||||
*
|
||||
@@ -104,7 +77,7 @@ public interface CommandManager {
|
||||
* @return a future that may be completed with the result of the command execution.
|
||||
* Can be completed exceptionally if an exception is thrown during execution.
|
||||
*/
|
||||
CompletableFuture<Boolean> executeAsync(CommandSource source, String cmdLine);
|
||||
CompletableFuture<Boolean> execute(CommandSource source, String cmdLine);
|
||||
|
||||
/**
|
||||
* Attempts to asynchronously execute a command from the given {@code cmdLine}
|
||||
@@ -115,7 +88,7 @@ public interface CommandManager {
|
||||
* @return a future that may be completed with the result of the command execution.
|
||||
* Can be completed exceptionally if an exception is thrown during execution.
|
||||
*/
|
||||
CompletableFuture<Boolean> executeImmediatelyAsync(CommandSource source, String cmdLine);
|
||||
CompletableFuture<Boolean> executeImmediately(CommandSource source, String cmdLine);
|
||||
|
||||
/**
|
||||
* Returns whether the given alias is registered on this manager.
|
||||
|
@@ -7,10 +7,6 @@
|
||||
|
||||
package com.velocitypowered.api.event.connection;
|
||||
|
||||
import static com.velocitypowered.api.event.connection.DisconnectEvent.LoginStatus.CANCELLED_BY_PROXY;
|
||||
import static com.velocitypowered.api.event.connection.DisconnectEvent.LoginStatus.CONFLICTING_LOGIN;
|
||||
import static com.velocitypowered.api.event.connection.DisconnectEvent.LoginStatus.SUCCESSFUL_LOGIN;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
|
||||
@@ -23,17 +19,6 @@ public final class DisconnectEvent {
|
||||
private final Player player;
|
||||
private final LoginStatus loginStatus;
|
||||
|
||||
@Deprecated
|
||||
public DisconnectEvent(Player player) {
|
||||
this(player, false);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public DisconnectEvent(Player player,
|
||||
boolean disconnectedDuringLogin) {
|
||||
this(player, disconnectedDuringLogin ? CANCELLED_BY_PROXY : SUCCESSFUL_LOGIN);
|
||||
}
|
||||
|
||||
public DisconnectEvent(Player player, LoginStatus loginStatus) {
|
||||
this.player = Preconditions.checkNotNull(player, "player");
|
||||
this.loginStatus = Preconditions.checkNotNull(loginStatus, "loginStatus");
|
||||
@@ -43,11 +28,6 @@ public final class DisconnectEvent {
|
||||
return player;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean disconnectedDuringLogin() {
|
||||
return this.loginStatus == CANCELLED_BY_PROXY || this.loginStatus == CONFLICTING_LOGIN;
|
||||
}
|
||||
|
||||
public LoginStatus getLoginStatus() {
|
||||
return loginStatus;
|
||||
}
|
||||
|
@@ -36,11 +36,6 @@ public final class ServerConnectedEvent {
|
||||
this.previousServer = previousServer;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public ServerConnectedEvent(Player player, RegisteredServer server) {
|
||||
this(player, server, null);
|
||||
}
|
||||
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
}
|
||||
|
Reference in New Issue
Block a user