Closed jpriani13 closed 10 years ago
send(Bukkit.getOnlinePlayers()) if you use the version it returns a Collection instead of an array.
When i do send(Bukkit.getOnlinePlayers()) it calls an error on .send
"if you use the version it returns a Collection instead of an array." https://github.com/Bukkit/Bukkit/commit/0d9771acf6e59ca77fea3f55a33508661bcf7a5d
bukkit 1.7.8+ i belive
Im using 1.7.9 but it doesn't seem to be working, its calling an error on .send because there is no option to send Bukkit.getOnlinePlayers() defined in fanciful
Bukkit.getOnlinePlayers()
returns a Collection<? extends Player>
, which should work just fine as an argument to FancyMessage.send(Iterable<? extends CommandSender>)
. Would you mind posting the exact text of the error you're getting, as well as your exact code? It's hard to diagnose the problem without that information.
This is the error: http://pastebin.com/C4W72kqi This is my exact code: http://pastebin.com/Bm1DGVG4
the SERVER is using a older bukkit where getOnlinePlayers still returns player[] this means that it will compile in eclipse where you use a newer version. you can see that in the error message at line 4 17.10 15:17:02 [Server] INFO The method send(Player) in the type FancyMessage is not applicable for the arguments (Player[])
I got it working! Thank you guys for all the help!
Im aware about the .send command, but there are only two options, .Send(player) and .send(sender), Is there a way to broadcast a Fancy Message to the whole server?