org.bukkit.craftbukkit.v1_8_R2

Discussion in 'Spigot Plugin Development' started by origin658, Jun 21, 2016.

  1. I cannot resolve theses

    import net.minecraft.server.v1_8_R2.NBTTagCompound;
    import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftItemStack;

    Where can I get them from as everything I have tired seams to be unsuccessful.
     
  2. what's the issue?
    you'll get these imports from the craftbukkit api & the spigot api
     
  3. Where can i find the craftbukkit 1.8 API?
     
  4. Are you trying to manually import them or is your IDE unable to do it? You might be trying to manually type in the wrong version import.
     
  5. Manually import it. I think i may have missed the craftbukkit API.

    Code (Text):
    <repositories>
            <repository>
                <id>project.local</id>
                <name>local repo</name>
                <url>file:${project.basedir}/lib</url>
            </repository>
            <repository>
                <id>spigot-repo</id>
                <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
            </repository>
        </repositories>

        <dependencies>
            <dependency>
                <groupId>org.spigotmc</groupId>
                <artifactId>spigot-api</artifactId>
                <version>1.8.8-R0.1-SNAPSHOT</version>
            </dependency>
            <dependency>
                <groupId>org.bukkit</groupId>
                <artifactId>bukkit</artifactId>
                <version>1.8.3-R0.1-SNAPSHOT</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>net.ess3</groupId>
                <artifactId>NMSProvider</artifactId>
                <version>2.0.1</version>
            </dependency>
        </dependencies>
    </project>
    Thats my POM if its any use. I have also imported some using the Jar files.
     
  6. Where is the craftbukkit API within that? I cant seam to find it.
     
  7. you have to run the program and then it builds you the craftbukkit api or you just implement the normal spigot.jar where the craftbukkit content is already implemented and use that as maven import from a repo folder
     
  8. replace v1_8_R2 to v1_8_R3 if you run 1.8.8
     
  9. I've tired both of them, but i still cannot resolve NBTTagCompound and CraftItemStack from it.
     
  10. do you have spigot.jar that you run the server on?
     
  11. The strange thing on my server it run fine, try keeping only1.8.8 spigot.jar
     
    #14 Klaus, Jun 21, 2016
    Last edited: Jun 21, 2016
  12. I don't really see how that helps the situation.
     
  13. Try, you hve nothing to lose
     
  14. I'm not running this on a server. I'm trying to import;

    import net.minecraft.server.v1_8_R2.NBTTagCompound;
    import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftItemStack;

    But i am unable to resolve them.
     
  15. add me on skype: terracraft.fr
     
  16. Just PM me on the forum.
     
  17. By PM i can't send you images and how to do it in real time..