mkremins / fanciful

Fancy Bukkit message formatting
MIT License
96 stars 82 forks source link

Send whole server, Fanciful Message #46

Closed jpriani13 closed 10 years ago

jpriani13 commented 10 years ago

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?

bendem commented 10 years ago

send(Bukkit.getOnlinePlayers()) if you use the version it returns a Collection instead of an array.

jpriani13 commented 10 years ago

When i do send(Bukkit.getOnlinePlayers()) it calls an error on .send

bendem commented 10 years ago

"if you use the version it returns a Collection instead of an array." https://github.com/Bukkit/Bukkit/commit/0d9771acf6e59ca77fea3f55a33508661bcf7a5d

killje commented 10 years ago

bukkit 1.7.8+ i belive

jpriani13 commented 10 years ago

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

mkremins commented 10 years ago

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.

jpriani13 commented 10 years ago

This is the error: http://pastebin.com/C4W72kqi This is my exact code: http://pastebin.com/Bm1DGVG4

killje commented 10 years ago

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[])

jpriani13 commented 10 years ago

I got it working! Thank you guys for all the help!