LuckPermsAPI not working in project
hamelech2007 opened this issue ยท 20 comments
I am trying to create a plugin that can give a rank through a command and I need luckperms api for it but I cant make it work. I've downloaded the jar and used it in the project structure but it doesn't recognize it in the IDE I am using IntelliJ 2020 community edition. I am very new to programming so if someone can help me please do it as detailed as you can. Thank you for any help.
Either use Maven or Gradle for plugin development, because using Jars isn't really good to do.
Do i need to put <dependencies> <dependency> <groupId>net.luckperms</groupId> <artifactId>api</artifactId> <version>5.0</version> <scope>provided</scope> </dependency> </dependencies>}
In the pom.xml because when I do put it there it shows invalid element found starting with element.... when I hover on the dependency
- Please use code blocks. Inline code is ugly for this.
- https://github.com/lucko/LuckPerms/wiki/Developer-API#maven
Then you made something wrong.
We can't read minds, nor see your PC, so actually provide information
<dependency>
<groupId>net.luckperms</groupId>
<artifactId>api</artifactId>
<version>5.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
when I uploaded the .jar of the api it wont show it in the external libraries as a .jar it shows it as a folder and inside it instead of .java there is .html
Maybe I am doing everything wrong. Can someone make a step-by-step guide on how to do it in maven
Can someone make a step-by-step guide on how to do it in maven
Learn to use maven. This has nothing to do with LuckPerms. Nothing about the LP API is special in terms of usage with Maven (or Gradle for that matter)
Can you paste your whole pom.xml
in https://hasteb.in, but be sure to strike out any passwords (if you have some in there)
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.hamelech2007</groupId>
<artifactId>Signs</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Signs</name>
<description>signs</description>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.luckperms</groupId>
<artifactId>api</artifactId>
<version>5.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Try that
I use another API in my project and all I had to do is just put the .jar in the project structure and everything worked fine.