Hey buys, i was wondering how to you make ranged chat similar to the minez system without endereyes but they can hear from about 250 blocks away
just listen to the player chat event (cant remember exactly what is called) and check if the player is less than 250 blocks away and then cancel the event if they aren't. I have no experience with chat related stuff so this may be completely wrong.
in my plugin i use: List<Player> players = Bukkit.getServer().getOnlinPlayers(); for(Player getters : players){ int range = 250; if(getters.getLocation().distance(event.getEntity().getLocation()) <= range){
Why would you make a list when getOnlinePlayers() is already returning a list? It's a waste of space honestly
in my original class it was ment to get a specific world from the config and search that in the bukkit worlds stuff, so i had to make it a list, i just forgot to change that