Solved player.spigot() not importing

Discussion in 'Spigot Plugin Development' started by eliasboy0202, Jan 17, 2020.

  1. Dear guys.

    So I have switched my PC recently and wanted to continue on my plugin in Intelij IDEA.
    I had backuped my project and reopened it on my other PC. (same libraries and Maven imports)
    But now my plugin cant define the following line:
    Code (Java):
                    p.spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(ChatColor.translateAlternateColorCodes('&',Main.getPlugin(Main.class).ActionBarConfig.getBars().getString("bars." + region + ".ABName"))));
     
    the p.spigot() part

    This 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>BandiCore</groupId>
        <artifactId>BandiCore</artifactId>
        <version>2.0-SNAPSHOT</version>
        <packaging>jar</packaging>

        <name>BandiCore</name>

        <description>Coreplugin</description>
        <properties>
            <java.version>1.8</java.version>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>
        <url>www.bandithemepark.net</url>

        <build>
            <defaultGoal>clean package</defaultGoal>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.7.0</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.1.0</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>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.14.4-R0.1-SNAPSHOT</version>
                <scope>provided</scope>
            </dependency><dependency>
            <groupId>org.bukkit</groupId>
            <artifactId>bukkit</artifactId>
            <version>1.11.2-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

        </dependencies>
    </project>
     
    And these are my normal imports:
    (see extra files)

    I hope someone knows how to fix this..
     

    Attached Files:

  2. Die Not use Bukkit when using Spigot-API
     
  3. Remove this part