#Noobed Help :D

52 messages · Page 1 of 1 (latest)

lean moon
#

Hi, im really new to Java and my Minecraft Plugin isn't loading because it cant find the plugin.yml

scarlet knollBOT
#

This post has been reserved for your question.

Hey @lean moon! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

lean moon
#

except

#

its in there

upper hawk
#

maybe try putting the plugin.yml into the resources directory

upper hawk
#

What exactly happens?

lean moon
#
[20:57:23 ERROR]: Could not load 'plugins\UHCAPI-HELIX.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:154) ~[server.jar:git-Spigot-21fe707-741a1bd]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [server.jar:git-Spigot-21fe707-741a1bd]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [server.jar:git-Spigot-21fe707-741a1bd]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [server.jar:git-Spigot-21fe707-741a1bd]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [server.jar:git-Spigot-21fe707-741a1bd]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_381]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
        ... 6 more



#

(console error)

upper hawk
#

Did you recreate the JAR file after putting the plugin.yml into the resources directory?

lean moon
#

built

#

artifacts...

#

"Executing pre-compile tasks…
Running 'before' tasks
Checking sources
Building artifact 'UHCAPI-HELIX:jar'…
Building artifact 'UHCAPI-HELIX:jar': copying files…
Building archives…
Building C:/Tweaks/HELIX-UHCAPI/UHCAPI-HELIX/out/artifacts/UHCAPI_HELIX_jar/UHCAPI-HELIX.jar…
Copying archives…
Running 'after' tasks
Finished, saving caches…
Executing post-compile tasks…
Finished, saving caches…
Synchronizing output directories…"

upper hawk
#

Can you make a copy of the JAR

lean moon
#

sure

upper hawk
#

the change the .jar to .zip

lean moon
#

decompiling it ?

upper hawk
#

and check whether a plugin.yml is in there

lean moon
#

tf are all those folders x)

upper hawk
#

Can you show the project structure?

lean moon
upper hawk
#

Both the first one and artifacts

lean moon
upper hawk
#

Is there something where you can select source folders?

lean moon
#

(server.jar = spigot)

upper hawk
#

yeah that

#

mark resources as a resource folder

lean moon
#

how

#

oh here 2s

upper hawk
#

click on resources in the picture

#

and then resources

lean moon
#

ty

#

imma test it

upper hawk
#

well first the folder than the option under mark as

lean moon
#

yes

#

"When it's not that, it's this" :
org.bukkit.plugin.InvalidPluginException: Cannot find main class `fr.helix.uhcapi.UHCAPI'
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:66) ~[server.jar:git-Spigot-21fe707-741a1bd]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:131) ~[server.jar:git-Spigot-21fe707-741a1bd]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[server.jar:git-Spigot-21fe707-741a1bd]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [server.jar:git-Spigot-21fe707-741a1bd]
at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [server.jar:git-Spigot-21fe707-741a1bd]
at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [server.jar:git-Spigot-21fe707-741a1bd]
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [server.jar:git-Spigot-21fe707-741a1bd]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_381]
Caused by: java.lang.ClassNotFoundException: fr.helix.uhcapi.UHCAPI
at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_381]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:101) ~[server.jar:git-Spigot-21fe707-741a1bd]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:86) ~[server.jar:git-Spigot-21fe707-741a1bd]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_381]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_381]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_381]
at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_381]
at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:64) ~[server.jar:git-Spigot-21fe707-741a1bd]
... 7 more

#

name: UHCAPI-HELIX
version: 1
main: fr.helix.uhcapi.UHCAPI
author: [hcqt]
description: UHCAPI pour Helix faite par hcqt - 2023

upper hawk
#

org.bukkit.plugin.InvalidPluginException: Cannot find main class `fr.helix.uhcapi.UHCAPI'

#

the plugin.yml should match the fully qualified class name I guess

lean moon
#

🤨

#

tryna understand

#

main: fr.helix.UHCAPI ?

#

ty nvm