Fixed wrong tab complete
This commit is contained in:
parent
6ab442d681
commit
e5124a83b0
@ -11,7 +11,7 @@ import com.velocitypowered.api.event.connection.DisconnectEvent;
|
|||||||
import com.velocitypowered.api.event.connection.PluginMessageEvent;
|
import com.velocitypowered.api.event.connection.PluginMessageEvent;
|
||||||
import com.velocitypowered.api.event.player.PlayerChatEvent;
|
import com.velocitypowered.api.event.player.PlayerChatEvent;
|
||||||
import com.velocitypowered.api.event.player.ServerPreConnectEvent;
|
import com.velocitypowered.api.event.player.ServerPreConnectEvent;
|
||||||
//import com.velocitypowered.api.event.player.TabCompleteEvent;
|
import com.velocitypowered.api.event.player.TabCompleteEvent;
|
||||||
import com.velocitypowered.api.proxy.Player;
|
import com.velocitypowered.api.proxy.Player;
|
||||||
import com.velocitypowered.api.proxy.ProxyServer;
|
import com.velocitypowered.api.proxy.ProxyServer;
|
||||||
import com.velocitypowered.api.proxy.ServerConnection;
|
import com.velocitypowered.api.proxy.ServerConnection;
|
||||||
@ -127,23 +127,11 @@ public class ProxyListener {
|
|||||||
event.setResult(ServerPreConnectEvent.ServerResult.denied());
|
event.setResult(ServerPreConnectEvent.ServerResult.denied());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
@Subscribe
|
||||||
"You have the opportunity to modify the response sent to the remote player."
|
|
||||||
In theory... it could be modified, but the respective methods do not exist.
|
|
||||||
I hope that the other event works for <1.12 even though this one should work.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*@Subscribe
|
|
||||||
public void onTabComplete(TabCompleteEvent event){
|
public void onTabComplete(TabCompleteEvent event){
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
if (plugin.loggedPlayers.contains(player.getUniqueId())) return;
|
if (!AuthmeVelocityAPI.isLogged(player)){
|
||||||
event.setTabComplete();?
|
event.getSuggestions().clear();
|
||||||
}*/
|
|
||||||
|
|
||||||
@Subscribe
|
|
||||||
public void onTabComplete(PlayerAvailableCommandsEvent event){
|
|
||||||
if (!AuthmeVelocityAPI.isLogged(event.getPlayer())) {
|
|
||||||
event.getRootNode().getChildren().iterator().remove();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user