No matter what plugin I use, what command I use, the console cannot broadcast a message to the server. Announcer doesn't work, ChatManager doesn't work, even /broadcast doesn't work. I'll post the log for when I do try to broadcast through the console and hopefully someone can help me out with this? >broadcast test [00:45:00 WARN]: Unexpected exception while parsing console command "broadcast test" org.bukkit.command.CommandException: Unhandled exception executing command 'broadcast' in plugin ChatManager v7.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.12.2.jar:git-Spigot-2086bb0-2f3ed3b] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.12.2.jar:git-Spigot-2086bb0-2f3ed3b] at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:648) ~[spigot-1.12.2.jar:git-Spigot-2086bb0-2f3ed3b] at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:634) [spigot-1.12.2.jar:git-Spigot-2086bb0-2f3ed3b] at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:444) [spigot-1.12.2.jar:git-Spigot-2086bb0-2f3ed3b] at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:407) [spigot-1.12.2.jar:git-Spigot-2086bb0-2f3ed3b] at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot-1.12.2.jar:git-Spigot-2086bb0-2f3ed3b] at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot-1.12.2.jar:git-Spigot-2086bb0-2f3ed3b] at java.lang.Thread.run(Unknown Source) [?:1.8.0_131] Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_12_R1.command.ColouredConsoleSender cannot be cast to org.bukkit.entity.Player at me.SgtBud.ChatManager.Commands.Broadcast.onCommand(Broadcast.java:20) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot-1.12.2.jar:git-Spigot-2086bb0-2f3ed3b] ... 8 more
Looks like someone forgot to do an instanceof check on the sender before casting to Player. Code (Java): if(sender instanceof Player) { Player player = (Player) sender; }
I actually just went through my files and deleted some unused plugins and when I restarted the server it worked perfectly fine. Not sure what plugin caused it, but I'm definitely glad that headache is over