Oczywiście w plugin.yml wszystko jest dopisane. Błędy:
Spoiler
Unexpected exception while parsing console command "pomoc"
org.bukkit.command.CommandException: Unhandled exception executing command 'pomoc' in plugin Komendy v1.0-SNAPSHOT
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[server.jar:git-Spigot-37d799b-3eb7236]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[server.jar:git-Spigot-37d799b-3eb7236]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchCommand(CraftServer.java:758) ~[server.jar:git-Spigot-37d799b-3eb7236]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.dispatchServerCommand(CraftServer.java:743) ~[server.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.DedicatedServer.handleCommandQueue(DedicatedServer.java:387) ~[server.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:356) ~[server.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1007) ~[server.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:846) ~[server.jar:git-Spigot-37d799b-3eb7236]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[server.jar:git-Spigot-37d799b-3eb7236]
at java.lang.Thread.run(Thread.java:832) [?:?]
Caused by: java.lang.ClassCastException: class org.bukkit.craftbukkit.v1_16_R3.command.ColouredConsoleSender cannot be cast to class org.bukkit.entity.Player (org.bukkit.craftbukkit.v1_16_R3.command.ColouredConsoleSender and org.bukkit.entity.Player are in unnamed module of loader 'app')
at io.github.mleczuuu.komendy.PomocCommand.onCommand(PomocCommand.java:11) ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[server.jar:git-Spigot-37d799b-3eb7236]
... 9 more
Pytanie
_xXCichyMleczXx_ 16
Siemka, staram się napisać plugin na prostą komendę /pomoc która wyśle obojętnie jaką wiadomość.
Kody:
Oczywiście w plugin.yml wszystko jest dopisane. Błędy:
Odnośnik do komentarza
Udostępnij na innych stronach
9 odpowiedzi na to pytanie
Rekomendowane odpowiedzi