1.16.5 I can't use the NameTagEdit API for my Plugin

Discussion in 'Spigot Plugin Development' started by HappyBavarian07, Jul 16, 2021.

Thread Status:
Not open for further replies.
  1. HappyBavarian07

    HappyBavarian07 Previously Quirin_Hosse

    First of all, sorry for my bad English!

    I'm using InteliJ for my Plugins

    I'm currently making a private CraftAttack plugin and thought about using NameTagEdit for the prefixes, but when I wanted to do it with Maven, just this came up:

    Cannot resolve com.nametagedit:nametagedit:4.1.0
    And all my Dependencies said: "Cannot resolve <Dependency Name>"

    [INFO]
    [INFO] -----------------< me.happybavarian07.regeln:caPlugin >-----------------
    [INFO] Building CA-Plugin 6.0
    [INFO] --------------------------------[ jar ]---------------------------------
    [WARNING] The POM for com.nametagedit:nametagedit:jar:4.1.0 is missing, no dependency information available

    Please help me, I've tried quite a bit, nothing worked!?
    If you need something (code, ...) just ask!
     
  2. Can you send your pom.xml

    Also this shouldn't have the resource tag
     
  3. HappyBavarian07

    HappyBavarian07 Previously Quirin_Hosse

    Yes, I didn't know which day I should do
    And here is my pom.xml:

    Code (Text):
    <?xml version="1.0" encoding="UTF-8"?>
    <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.happybavarian07.regeln</groupId>
        <artifactId>caPlugin</artifactId>
        <version>6.0</version>
        <packaging>jar</packaging>

        <name>CA-Plugin</name>

        <properties>
            <java.version>1.8</java.version>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>

        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</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.2.4</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>dmulloy2-repo</id>
                <url>https://repo.dmulloy2.net/repository/public/</url>
            </repository>
            <repository>
                <id>codemc-repo</id>
                <url>https://repo.codemc.org/repository/maven-public/</url>
                <layout>default</layout>
            </repository>
            <repository>
                <id>placeholderapi</id>
                <url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
            </repository>
            <repository>
                <id>Maven Central</id>
                <url>https://repo1.maven.org/maven2/</url>
            </repository>
            <repository>
                <id>upstream</id>
                <url>http://ci.nametagedit.com/plugin/repository/everything/</url>
            </repository>
        </repositories>
        <dependencies>
            <dependency>
                <groupId>org.spigotmc</groupId>
                <artifactId>spigot</artifactId>
                <version>1.16.5-R0.1-SNAPSHOT</version>
            </dependency>
            <dependency>
                <groupId>com.comphenix.protocol</groupId>
                <artifactId>ProtocolLib</artifactId>
                <version>4.6.0</version>
            </dependency>
            <dependency>
                <groupId>de.tr7zw</groupId>
                <artifactId>item-nbt-api-plugin</artifactId>
                <version>2.7.1</version>
            </dependency>
            <dependency>
                <groupId>me.clip</groupId>
                <artifactId>placeholderapi</artifactId>
                <version>2.10.9</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.elmakers.mine.bukkit</groupId>
                <artifactId>EffectLib</artifactId>
                <version>9.0</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.nametagedit</groupId>
                <artifactId>nametagedit</artifactId>
                <version>4.1.0</version>
            </dependency>
        </dependencies>
    </project>
     
     
  4. Try this repository instead:
    Code (Text):
    <repository>
        <id>upstream</id>
        <url>http://ci.playmc.cc/plugin/repository/everything/</url>
    </repository>
     
  5. HappyBavarian07

    HappyBavarian07 Previously Quirin_Hosse

    I just tried compiling it in Maven without the dependency and then it worked, but then I had to do it again and then it didn't work again, it said that the Package could not be found!

    And the Repository:
    Code (Text):

            <repository>
                <id>upstream</id>
                <url>http://ci.playmc.cc/plugin/repository/everything/</url>
            </repository>
    didn't worked too!
    The error is the same as that from the old repository
     
  6. HappyBavarian07

    HappyBavarian07 Previously Quirin_Hosse

    It seems as if I have found a solution, but it is only temporary and I am open to other solutions: I just added it as a library and created an artifact that will do it if necessary.
     
  7. HappyBavarian07

    HappyBavarian07 Previously Quirin_Hosse

    I have now decided to simply use my own methods and ways (so I no longer use an API for this.) Thread closed!
     
Thread Status:
Not open for further replies.