NPCLib icon indicating copy to clipboard operation
NPCLib copied to clipboard

1_16_R3 incompatible

Open x9nico opened this issue 3 years ago • 5 comments

Describe the bug A clear and concise description of what the bug is.

NPCLib usage option NPCLib can be used in multiple ways, please provide the number corresponding to your usage option.

Option 3

NPCLib JAR name npclib-plugin-2.12.1-SNAPSHOT.jar

Server version E.g. CraftBukkit version git-Spigot-a1f2566-97b0057 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT) (use command /version)

Purpur version git-Purpur-1131 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

To Reproduce Steps to reproduce the behavior: Just start your server With purpur 1.16.5

image

x9nico avatar May 26 '21 15:05 x9nico

same problem

schiasileon avatar Jul 27 '21 14:07 schiasileon

up to v1_16_R3 == 1.16.5 I think you need an update

keksgauner avatar Jul 28 '21 13:07 keksgauner

I checked my server with Bukkit.getBukkitVersion() and getServer().getClass().getPackage().getName() I got 1.16.5-R0.1-SNAPSHOT and org.bukkit.craftbukkit.v1_16_R3 back there is a v1_16_R3. But there is still this Error NPCLib Failed to initiate. Your server's version (v1_16_R3) is not supported

The plugin try to get the version with this.getServer().getClass().getPackage().getName().split("\.")[3]; I got v1_16_R3 this is right But why it cannot get with Class.forName("net.jitse.npclib.nms." + versionName + ".NPC_" + versionName); the right class

Oh I see there is no nms

keksgauner avatar Jul 28 '21 13:07 keksgauner

I figured it out. You need to shade the -plugin and not -api version because the api version does not include the nms packages thus not finding the classes.

schiasileon avatar Jul 28 '21 13:07 schiasileon

Yes you need

<dependency>
<groupId>net.jitse</groupId>
    <artifactId>npclib-plugin</artifactId>
    <version>2.12.1-SNAPSHOT</version>
    <scope>compile</scope>
</dependency>

In Intellij you must exract the project to the root of your plugin. (Sorry for my english)

keksgauner avatar Jul 28 '21 16:07 keksgauner