dunno if it works (2)
This commit is contained in:
@@ -6,6 +6,7 @@ import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.geysermc.geyser.api.GeyserApi;
|
||||
|
||||
public class PingCommand implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
@@ -25,7 +26,8 @@ public class PingCommand implements CommandExecutor {
|
||||
if (ping_host.equals("404svh")) {
|
||||
sender.sendMessage("Failed to fetch server ping.");
|
||||
} else {
|
||||
sender.sendMessage(ChatColor.ITALIC + "Server ping: %sms".formatted(ping_host));
|
||||
if (GeyserApi.api().isBedrockPlayer(player.getUniqueId()))
|
||||
sender.sendMessage(ChatColor.RED + "" + ChatColor.ITALIC + "This command will not work properly on bedrock clients.");
|
||||
sender.sendMessage(ChatColor.ITALIC + "Player ping: %sms".formatted(player.getPing()));
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user