mirror of
https://github.com/tanyaofei/minecraft-fakeplayer.git
synced 2025-09-14 11:16:46 +08:00
Compare commits
2 Commits
fe316696d4
...
07eaa9774a
Author | SHA1 | Date | |
---|---|---|---|
![]() |
07eaa9774a | ||
![]() |
62b6da6c81 |
@ -108,6 +108,12 @@
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.github.hello09x.fakeplayer</groupId>
|
||||
<artifactId>fakeplayer-v1_21_8</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@ -197,6 +203,11 @@
|
||||
<include name="fakeplayer-${revision}.jar"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy tofile="../server-1.21.8/plugins/fakeplayer.jar">
|
||||
<fileset dir="${project.build.directory}">
|
||||
<include name="fakeplayer-${revision}.jar"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
|
@ -11,3 +11,5 @@ io.github.hello09x.fakeplayer.v1_21_4.spi.NMSBridgeImpl
|
||||
io.github.hello09x.fakeplayer.v1_21_5.spi.NMSBridgeImpl
|
||||
io.github.hello09x.fakeplayer.v1_21_6.spi.NMSBridgeImpl
|
||||
io.github.hello09x.fakeplayer.v1_21_7.spi.NMSBridgeImpl
|
||||
io.github.hello09x.fakeplayer.v1_21_8.spi.NMSBridgeImpl
|
||||
|
||||
|
106
fakeplayer-v1_21_8/pom.xml
Normal file
106
fakeplayer-v1_21_8/pom.xml
Normal file
@ -0,0 +1,106 @@
|
||||
<?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>
|
||||
<parent>
|
||||
<groupId>io.github.hello09x.fakeplayer</groupId>
|
||||
<artifactId>fakeplayer-parent</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>fakeplayer-v1_21_8</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<nms.version>1.21.8-R0.1-SNAPSHOT</nms.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.github.hello09x.fakeplayer</groupId>
|
||||
<artifactId>fakeplayer-core</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.github.hello09x.fakeplayer</groupId>
|
||||
<artifactId>fakeplayer-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.github.hello09x.fakeplayer</groupId>
|
||||
<artifactId>fakeplayer-v1_21_6</artifactId>
|
||||
<version>${revision}</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>${nms.version}</version>
|
||||
<classifier>remapped-mojang</classifier>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>net.md-5</groupId>
|
||||
<artifactId>specialsource-maven-plugin</artifactId>
|
||||
<version>2.0.3</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>remap</goal>
|
||||
</goals>
|
||||
<id>remap-obf</id>
|
||||
<configuration>
|
||||
<srgIn>org.spigotmc:minecraft-server:${nms.version}:txt:maps-mojang</srgIn>
|
||||
<reverse>true</reverse>
|
||||
<remappedDependencies>
|
||||
org.spigotmc:spigot:${nms.version}:jar:remapped-mojang
|
||||
</remappedDependencies>
|
||||
<remappedArtifactAttached>true</remappedArtifactAttached>
|
||||
<remappedClassifierName>remapped-obf</remappedClassifierName>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>remap</goal>
|
||||
</goals>
|
||||
<id>remap-spigot</id>
|
||||
<configuration>
|
||||
<inputFile>
|
||||
${project.build.directory}/${project.artifactId}-${project.version}-remapped-obf.jar
|
||||
</inputFile>
|
||||
<srgIn>org.spigotmc:minecraft-server:${nms.version}:csrg:maps-spigot</srgIn>
|
||||
<remappedDependencies>org.spigotmc:spigot:${nms.version}:jar:remapped-obf
|
||||
</remappedDependencies>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,55 @@
|
||||
package io.github.hello09x.fakeplayer.v1_21_8.spi;
|
||||
|
||||
import io.github.hello09x.fakeplayer.api.spi.*;
|
||||
import io.github.hello09x.fakeplayer.core.Main;
|
||||
import io.github.hello09x.fakeplayer.v1_21_6.spi.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.util.Set;
|
||||
|
||||
public class NMSBridgeImpl implements NMSBridge {
|
||||
|
||||
private final static Set<String> SUPPORTS = Set.of("1.21.8");
|
||||
|
||||
@Override
|
||||
public @NotNull NMSEntity fromEntity(@NotNull Entity entity) {
|
||||
return new NMSEntityImpl(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull NMSServer fromServer(@NotNull Server server) {
|
||||
return new NMSServerImpl(server);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull NMSServerLevel fromWorld(@NotNull World world) {
|
||||
return new NMSServerLevelImpl(world);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull NMSServerPlayer fromPlayer(@NotNull Player player) {
|
||||
return new NMSServerPlayerImpl(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull NMSNetwork createNetwork(@NotNull InetAddress address) {
|
||||
return new NMSNetworkImpl(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSupported() {
|
||||
return SUPPORTS.contains(Bukkit.getMinecraftVersion());
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ActionTicker createAction(@NotNull Player player, @NotNull ActionType action, @NotNull ActionSetting setting) {
|
||||
return new ActionTickerImpl(Main.getInjector().getInstance(NMSBridge.class), player, action, setting);
|
||||
}
|
||||
|
||||
}
|
3
pom.xml
3
pom.xml
@ -27,12 +27,13 @@
|
||||
<module>fakeplayer-v1_21_5</module>
|
||||
<module>fakeplayer-v1_21_6</module>
|
||||
<module>fakeplayer-v1_21_7</module>
|
||||
<module>fakeplayer-v1_21_8</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<revision>0.3.17</revision>
|
||||
<revision>0.3.18</revision>
|
||||
|
||||
<detools.version>0.1.6-SNAPSHOT</detools.version>
|
||||
</properties>
|
||||
|
Loading…
Reference in New Issue
Block a user