Skip to content

Commit

Permalink
支持1.20.5版本以上
Browse files Browse the repository at this point in the history
  • Loading branch information
Noogear authored Sep 8, 2024
1 parent 17b3b82 commit ecda751
Show file tree
Hide file tree
Showing 6 changed files with 180 additions and 84 deletions.
28 changes: 28 additions & 0 deletions PlayerHeadGetter.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="minecraft" name="Minecraft">
<configuration>
<userChosenTypes>
<map>
<entry key="ARCHITECTURY" value="false" />
<entry key="FORGE" value="false" />
<entry key="FABRIC" value="false" />
<entry key="SPONGE" value="false" />
<entry key="BUNGEECORD" value="false" />
<entry key="WATERFALL" value="false" />
<entry key="VELOCITY" value="false" />
<entry key="MIXIN" value="false" />
<entry key="NEOFORGE" value="false" />
<entry key="MCP" value="false" />
</map>
</userChosenTypes>
<autoDetectTypes>
<platformType>PAPER</platformType>
<platformType>ADVENTURE</platformType>
</autoDetectTypes>
<projectReimportVersion>1</projectReimportVersion>
</configuration>
</facet>
</component>
</module>
77 changes: 77 additions & 0 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.zimzaza4</groupId>
<artifactId>PlayerHeadGetter</artifactId>
<name>PlayerHeadGetter</name>
<version>1.0-SNAPSHOT</version>
<build>
<defaultGoal>clean package</defaultGoal>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<relocations>
<relocation>
<pattern>de.tr7zw.changeme.nbtapi</pattern>
<shadedPattern>me.zimzaza4.playerheadgetter.api.NBT</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>minecraft</id>
<url>https://libraries.minecraft.net/</url>
</repository>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>codemc-repo</id>
<url>https://repo.codemc.io/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<properties>
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
67 changes: 23 additions & 44 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
<name>PlayerHeadGetter</name>

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

<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
Expand All @@ -30,16 +31,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
<configuration>
Expand All @@ -48,9 +46,7 @@
<pattern>de.tr7zw.changeme.nbtapi</pattern>
<shadedPattern>me.zimzaza4.playerheadgetter.api.NBT</shadedPattern>
</relocation>

</relocations>

</configuration>
</plugin>
</plugins>
Expand All @@ -64,62 +60,45 @@

<repositories>
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
<id>minecraft</id>
<url>https://libraries.minecraft.net/</url>
</repository>
<repository>
<id>CodeMC</id>
<url>https://repo.codemc.org/repository/maven-public</url>
<layout>default</layout>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
<id>codemc-repo</id>
<url>https://repo.codemc.io/repository/maven-public/</url>
<layout>default</layout>
</repository>

</repositories>

<dependencies>
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.19.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.Slimefun</groupId>
<artifactId>Slimefun4</artifactId>
<version>RC-28</version>
<version>1.21-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>io.github.baked-libs</groupId>
<artifactId>dough-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api</artifactId>
<version>2.12.1-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>item-nbt-api-plugin</artifactId>
</exclusion>
<exclusion>
<groupId>*</groupId>
<artifactId>nbt-data-api</artifactId>
</exclusion>
<exclusion>
<groupId>*</groupId>
<artifactId>nbt-injector</artifactId>
</exclusion>
</exclusions>
<version>2.13.2</version>
</dependency>
<dependency>
<groupId>com.mojang</groupId>
<artifactId>brigadier</artifactId>
<version>1.2.9</version>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-chat</artifactId>
<version>1.20-R0.2</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.HashSet;
import java.util.Set;

public final class PlayerHeadGetter extends JavaPlugin {

public static Set<String> textures = new HashSet<>();
public static PlayerHeadGetter plugin;


@Override
public void onEnable() {
// Plugin startup logic
plugin = this;


Bukkit.getPluginCommand("skullgetter").setExecutor(new SkullCommand());


}

@Override
Expand Down
Loading

0 comments on commit ecda751

Please sign in to comment.