Solved Spigot modifications to NMS not present when using Maven

Discussion in 'Spigot Plugin Development' started by RobinMC, Jun 8, 2017.

  1. I am in the process of updating all my projects to Maven, because I understand it now and it's very useful. However, I noticed that PacketPlayOutChat.components went missing. It's something spigot has added (// Spigot comment in source code)

    Pom.xml looks like this:
    Code (Text):

            <spigot.version>1.12-R0.1-SNAPSHOT</spigot.version>

    ...

            <dependency> <!-- Spigot API -->
                <groupId>org.spigotmc</groupId>
                <artifactId>spigot-api</artifactId>
                <version>${spigot.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency> <!-- Craftbukkit for NMS -->
                <groupId>org.bukkit</groupId>
                <artifactId>craftbukkit</artifactId>
                <version>${spigot.version}</version>
                <scope>provided</scope>
            </dependency>

    ...

            <repository>
                <id>spigot-repo</id>
                <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
            </repository>
    Full pom.xml: https://paste.md-5.net/xebujuyecu.xml
     
  2. Unless you're using a shady repo you can't get craftbukkit from maven. You'd need to have the jar local and use system scope, I think.

    If you want spigot features use the spigot jar instead of the craftbukkit jar.

    EDIT:
    [​IMG]
     
    #2 NathanWolf, Jun 8, 2017
    Last edited: Jun 8, 2017
  3. Change '<artifactId>craftbukkit</artifactId>' to '<artifactId>spigot<artifactId>' (and also change the groupID to 'org.spigotmc'), and make sure you have ran BuildTools on your machine with the version you are using, this will install it in your local repository.
     
    • Like Like x 1
    • Useful Useful x 1
  4. Right, sorry, ignore me. :)
     
  5. #5 RobinMC, Jun 8, 2017
    Last edited: Jun 8, 2017