ProtocolLib

3M Downloads

How to use version 5.2.0 with dependencies?

KanCiGamer opened this issue · 4 comments

commented

I can't use version 5.1.0 because it can't run on minecraft 1.20.4. Is there any way to depend on version 5.2.0 or compatible version with 1.20.4?

commented

You can depend on 5.2.0-SNAPSHOT

commented

I have followed your description, here is information about my code

      <dependency>
          <groupId>com.comphenix.protocol</groupId>
          <artifactId>ProtocolLib</artifactId>
          <version>5.2.0-SNAPSHOT</version>
          <scope>provided</scope>
      </dependency>
      <repository>
          <id>dmulloy2-repo</id>
          <url>https://repo.dmulloy2.net/repository/public/</url>
      </repository>
private ProtocolManager protocolManager;
    @Override
    public void onEnable() {
        protocolManager = ProtocolLibrary.getProtocolManager();
        if (protocolManager != null)
        {
            getLogger().info("ProtocolLib is loaded");
        }
        else
        {
            getLogger().warning("ProtocolLib is not loaded");
        }
    }

When I build the project and run it in minecraft 1.20.4 server it always returns null. If I remove the scope will it error?

Error occurred while enabling TuTien v1.2.6-Beta (Is it up to date?)
java.lang.NoClassDefFoundError: com/comphenix/protocol/ProtocolLibrary
at kanci.gamer.tutien.TuTien.onEnable(TuTien.java:32) ~[TuTien-1.2.6-Beta.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:188) ~[paper-1.20.4.jar:git-Paper-496]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.4.jar:git-Paper-496]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.4.jar:git-Paper-496]

My project is paper plugin. I don't know what I installed wrong. Can you help me? @0utplay Sorry for tagging you

commented

You have to install ProtocolLib onto the server

commented

I already have ProtocolLib in my Server! My problem was solved when I moved my project to Spigot instead of Paper. Thank you, you are the only one who answered me, during the past 5 days when I asked someone with ProtocolLib on github, no one answered. Sincerely thank you! <3