[Idea]: Folia support for OpenInv #196
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!--
|
<!--
|
||||||
~ Copyright (C) 2011-2021 lishid. All rights reserved.
|
~ Copyright (C) 2011-2022 lishid. All rights reserved.
|
||||||
~
|
~
|
||||||
~ This program is free software: you can redistribute it and/or modify
|
~ This program is free software: you can redistribute it and/or modify
|
||||||
~ it under the terms of the GNU General Public License as published by
|
~ it under the terms of the GNU General Public License as published by
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>16</maven.compiler.source>
|
<maven.compiler.source>16</maven.compiler.source>
|
||||||
<maven.compiler.target>16</maven.compiler.target>
|
<maven.compiler.target>16</maven.compiler.target>
|
||||||
|
<spigot.version>1.17.1-R0.1-SNAPSHOT</spigot.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@@ -39,7 +40,7 @@
|
|||||||
<artifactId>spigot</artifactId>
|
<artifactId>spigot</artifactId>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<version>1.17.1-R0.1-SNAPSHOT</version>
|
<version>${spigot.version}</version>
|
||||||
<classifier>remapped-mojang</classifier>
|
<classifier>remapped-mojang</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -71,34 +72,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>net.md-5</groupId>
|
<groupId>net.md-5</groupId>
|
||||||
<artifactId>specialsource-maven-plugin</artifactId>
|
<artifactId>specialsource-maven-plugin</artifactId>
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>remap</goal>
|
|
||||||
</goals>
|
|
||||||
<id>remap-obf</id>
|
|
||||||
<configuration>
|
|
||||||
<srgIn>org.spigotmc:minecraft-server:1.17.1-R0.1-SNAPSHOT:txt:maps-mojang</srgIn>
|
|
||||||
<reverse>true</reverse>
|
|
||||||
<remappedDependencies>org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT: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:1.17.1-R0.1-SNAPSHOT:csrg:maps-spigot</srgIn>
|
|
||||||
<remappedDependencies>org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT:jar:remapped-obf</remappedDependencies>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@@ -77,34 +77,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>net.md-5</groupId>
|
<groupId>net.md-5</groupId>
|
||||||
<artifactId>specialsource-maven-plugin</artifactId>
|
<artifactId>specialsource-maven-plugin</artifactId>
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>package</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>remap</goal>
|
|
||||||
</goals>
|
|
||||||
<id>remap-obf</id>
|
|
||||||
<configuration>
|
|
||||||
<srgIn>org.spigotmc:minecraft-server:${spigot.version}:txt:maps-mojang</srgIn>
|
|
||||||
<reverse>true</reverse>
|
|
||||||
<remappedDependencies>org.spigotmc:spigot:${spigot.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:${spigot.version}:csrg:maps-spigot</srgIn>
|
|
||||||
<remappedDependencies>org.spigotmc:spigot:${spigot.version}:jar:remapped-obf</remappedDependencies>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
32
pom.xml
32
pom.xml
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
~ Copyright (C) 2011-2021 lishid. All rights reserved.
|
~ Copyright (C) 2011-2022 lishid. All rights reserved.
|
||||||
~
|
~
|
||||||
~ This program is free software: you can redistribute it and/or modify
|
~ This program is free software: you can redistribute it and/or modify
|
||||||
~ it under the terms of the GNU General Public License as published by
|
~ it under the terms of the GNU General Public License as published by
|
||||||
@@ -29,6 +29,8 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>1.8</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>1.8</maven.compiler.target>
|
||||||
|
<!-- Silence IDE warning - property is declared in individual internal modules. -->
|
||||||
|
<spigot.version>unknown</spigot.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
@@ -144,6 +146,34 @@
|
|||||||
<groupId>net.md-5</groupId>
|
<groupId>net.md-5</groupId>
|
||||||
<artifactId>specialsource-maven-plugin</artifactId>
|
<artifactId>specialsource-maven-plugin</artifactId>
|
||||||
<version>1.2.2</version>
|
<version>1.2.2</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>remap</goal>
|
||||||
|
</goals>
|
||||||
|
<id>remap-obf</id>
|
||||||
|
<configuration>
|
||||||
|
<srgIn>org.spigotmc:minecraft-server:${spigot.version}:txt:maps-mojang</srgIn>
|
||||||
|
<reverse>true</reverse>
|
||||||
|
<remappedDependencies>org.spigotmc:spigot:${spigot.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:${spigot.version}:csrg:maps-spigot</srgIn>
|
||||||
|
<remappedDependencies>org.spigotmc:spigot:${spigot.version}:jar:remapped-obf</remappedDependencies>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011-2021 lishid. All rights reserved.
|
# Copyright (C) 2011-2022 lishid. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software: you can redistribute it and/or modify
|
# This program is free software: you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -42,22 +42,10 @@ readarray -t modules <<< "$(mvn help:evaluate -Dexpression=project.modules -q -D
|
|||||||
declare -n versions="spigot_versions"
|
declare -n versions="spigot_versions"
|
||||||
|
|
||||||
for module in "${modules[@]}"; do
|
for module in "${modules[@]}"; do
|
||||||
# Get number of dependencies declared in pom of specified internal module.
|
# Get Spigot version.
|
||||||
max_index=$(mvn help:evaluate -Dexpression=project.dependencies -q -DforceStdout -P all -pl "$module" | grep -c "<dependency>")
|
spigot_version=$(mvn help:evaluate -Dexpression=spigot.version -q -DforceStdout -P all -pl "$module")
|
||||||
|
versions+=("$spigot_version")
|
||||||
for ((i=0; i < max_index; i++)); do
|
echo "$spigot_version"
|
||||||
# Get artifactId of dependency.
|
|
||||||
artifact_id=$(mvn help:evaluate -Dexpression=project.dependencies["$i"].artifactId -q -DforceStdout -P all -pl "$module")
|
|
||||||
|
|
||||||
# Ensure dependency is Spigot.
|
|
||||||
if [[ "$artifact_id" == spigot ]]; then
|
|
||||||
# Get Spigot version.
|
|
||||||
spigot_version=$(mvn help:evaluate -Dexpression=project.dependencies["$i"].version -q -DforceStdout -P all -pl "$module")
|
|
||||||
versions+=("$spigot_version")
|
|
||||||
echo "$spigot_version"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Reset JVM parameters
|
# Reset JVM parameters
|
||||||
|
Reference in New Issue
Block a user