I made a plugin that lists the ranks on a server but when I tested it, it gave an error and didn't start up. Error Message: 06.01 20:23:13 [Server] INFO org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: me/CubedOutGaming/Ranks/Ranks : Unsupported major.minor version 52.0 06.01 20:23:13 [Server] ERROR Could not load 'plugins/Ranks.jar' in folder 'plugins' I'm not so sure what it means. Any help for what I should do?
It sounds like you're trying to run a Java 1.8 plugin on a system that only supports 1.7. Or vice-versa, I'm not sure. I do know that the error means you're using a plugin that isn't supported on your language level.
I found how to compile with Java 7 but I am am not using a Maven Project so I can't find pom.xml to switch to Java 7. I am using a JavaProject instead.
@Trill In eclipse you can right click your project and click "Build path". Go to the libraries tab and click the java library it is using then select edit and change it to the desired version.
@Trill If you don't understand what Maven is and why it's used, you probably shouldn't be using it. Just change your compile version. It really is not difficult.
@Trill D̶o̶ ̶y̶o̶u̶ ̶k̶n̶o̶w̶ ̶w̶h̶a̶t̶ ̶m̶a̶v̶e̶n̶ ̶i̶s̶?̶ ̶I̶f̶ ̶n̶o̶t̶ ̶t̶h̶e̶n̶ ̶e̶i̶t̶h̶e̶r̶ ̶g̶o̶o̶g̶l̶e̶ ̶i̶t̶ ̶a̶n̶d̶ ̶f̶i̶n̶d̶ ̶o̶u̶t̶ ̶o̶r̶ ̶d̶o̶ ̶w̶h̶a̶t̶ ̶I̶ ̶s̶t̶a̶t̶e̶d̶.̶ Ninja'd
@mythbusterma That picture shows how it was set already. I didn't change anything. Switching it to 1.8 gives errors everywhere... What should I do? Now the plugin shows up in the list of plugins but everytime that I type the command to use the plugin, it gives: http://gyazo.com/f90b5e7bc2b9336bb4c4cd47fd603091 The Console shows: 07.01 09:57:17 [Server] ERROR Cannot load configuration from jar 07.01 09:57:17 [Server] INFO Enabling Ranks v1.0 EDIT by Moderator: merged posts, please use the edit button instead of double posting.
The image you showed would tell me that an error stacktrace probably showed up in the console. We'd need to see that and some of your source, particularly the class where the command is fired.
When I type the command in chat: 07.01 10:19:54 [Server] INFO ... 13 more 07.01 10:19:54 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at me.CubedOutGaming.Ranks.Ranks.onCommand(Ranks.java:32) ~[?:?] 07.01 10:19:54 [Server] INFO Caused by: java.lang.NullPointerException 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:817) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerConnection.java:956) [craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServer.java:701) ~[craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:180) ~[craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit-beta.jar:git-Bukkit-1.7.9-R0.1-10-g8688bd4-b3092jnks] 07.01 10:19:54 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'ranks' in plugin Ranks v1.0 07.01 10:19:54 [Server] ERROR null
Maybe this help you : Code: public void sendMessage(Player player, String path) { if(getConfig().getString(path) == null { return; } String string = getConfig().getString(path); player.sendMessage(ChatColor.translateAlternateColorCodes('&', string)); } //How to use it : sendMessage(player , "X");
I don't think that this is the best solution to it but I erased the config and made everything by sending text to a player using the regular Eclipse color tools e.g (ChatColor.AQUA)