#Hey I m having problems in creating a
1 messages ยท Page 1 of 1 (latest)
Paste your pom.
is the plugin.yml in src/main/resources?
yes
if you decompile that jar file with smth with winrar, is the plugin.yml there?
Apparently not according to the stacktrace.
or just make it a zip
here's the pom https://paste.md-5.net/efexoferuq.xml
Wtf is this. lol
auto generated
By?
vscode
Yikes. 1 sec
yea the plugin.yml isn't in the .jar file
are you building with mvn package?
well no idea why that would be an issue but whatever
A more ideal pom would look like this. https://paste.md-5.net/xirojiveka.xml
yes i think so since the command is & mvn install
Idk what kinda crack vscode is smoking, but whatever it is, ain't cutting it.
๐
Try using the pom I sent and just adjust the fields that need modifying.
umm its still telling me the same error. i checked whether the .jar file contains plugin.yml and it still doesn't
Also, for future reference, the wiki has a tutorial for maven projects with IntelliJ. Although a different IDE, maven is still maven at the end of the day. You might want to read up on that to get an idea on how the pom should be setup. https://www.spigotmc.org/wiki/creating-a-plugin-with-maven-using-intellij-idea/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Can you screenshot your project structure?
?img
Wait, do commands not work in threads?
from vscode?
Yea, just want to confirm something.
how do i paste an image here? :''D
You have to be verified. Otherwise you can paste imgur or lightshot links.
Huh, would you look at that. They also have a tutorial for VSCode. https://www.spigotmc.org/wiki/creating-a-blank-spigot-plugin-in-vs-code/
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
Oh wait. I just realized that you already said that at the start. ๐
I can read. I promise. :3
Also, what does your plugin.yml currently look like?
heres the structure
plugin.yml is just main: com.testiplugin.App name: demo version: 0.1
Hmm, it's hard to tell off of that screenshot, mainly due to how vscode formats directory collapses, but it looks like your have the resources folder in the wrong location. The resources folder should be under the /main directory. It should fit alongside the /java directory.
you are right
how didnt i realise this sooner :d
now im getting a different error when starting the server. https://paste.md-5.net/qenasuguri.md
"org.bukkit.plugin.InvalidPluginException: main class `com.testiplugin.App' does not extend JavaPlugin"
package com.testiplugin;
import org.bukkit.plugin.java.JavaPlugin;
public class App extends JavaPlugin {
@Override
public void onEnable() {
getLogger().info("Hello, SpigotMC!");
}
@Override
public void onDisable() {
getLogger().info("See you again, SpigotMC!");
}
}
You might have to specify the maven build plugin version.
you got any recommendations for the version?
Latest version is always recommended.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>16</source>
<target>16</target>
</configuration>
</plugin>
where am i supposed to put that exactly? im only getting [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-parseable POM m:\KillaMC\testPlugin\demo\pom.xml: TEXT must be immediately followed by END_TAG and not START_TAG (position: START_TAG seen ...<plugin>\r\n \r\n <groupId>... @18:18) @ line 18, column 18
Plugins go under the build section of the pom.
<build>
<plugins>
<!-- Plugins go here -->
<plugin>
</plugin>
</plugins>
</build>
now im getting \demo\pom.xml: Unrecognised tag: 'plugin' (position: START_TAG seen ...</properties>\r\n\r\n <plugin>... @20:11)
oh nvm the last one
Im still getting this error after defining the maven build version
What's your project structure look like now?
You may also need to include this in your build section.
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<includes>
<include>plugin.yml</include>
</includes>
</resource>
</resources>
I cracked it