Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
26.1.1:startup
26.1.2:startup
26.2:startup
26.3:startup
- name: folia Java 17
id: folia-java17
platform: folia
Expand Down Expand Up @@ -110,6 +111,7 @@ jobs:
cases: >-
26.1.2:startup
26.2:startup
26.3:startup

name: ${{ matrix.name }}
timeout-minutes: 45
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ integration.

> DebugStickPro requires
> [PacketEvents](https://github.com/retrooper/packetevents) 2.13.0 or later.
> PacketEvents has no release with Minecraft 26.3 support yet, so 26.3 servers
> need the 2.14.0 development build.
>
> The plugin is under active development. Test updates on a non-production server
> and report reproducible problems on the issue tracker.
Expand Down Expand Up @@ -94,9 +96,9 @@ The server owner decides which commands and modes players may use.

| Component | Requirement |
| --- | --- |
| Server software | Spigot, Paper, or Folia from Minecraft 1.19.4 through 26.2. Paper is the primary and recommended platform. |
| Server software | Spigot, Paper, or Folia from Minecraft 1.19.4 through 26.3. Paper is the primary and recommended platform. |
| Java runtime | The plugin targets Java 17. Run the Java version required by your chosen Minecraft server release. |
| Required plugin | [PacketEvents](https://github.com/retrooper/packetevents) 2.13.0 or later. |
| Required plugin | [PacketEvents](https://github.com/retrooper/packetevents) 2.13.0 or later. Minecraft 26.3 requires the 2.14.0 development build; 2.13.0 cannot load on 26.3. |
| Optional plugins | CoreProtect and PlaceholderAPI. |

VirtualEntities is bundled inside DebugStickPro and does not need to be installed
Expand Down Expand Up @@ -223,7 +225,7 @@ for custom locales, from English. Existing translations are preserved.

| Symptom | Check |
| --- | --- |
| DebugStickPro does not enable | Confirm PacketEvents 2.13.0 or later is installed and enabled first. Check that the server and Java versions match the support table. |
| DebugStickPro does not enable | Confirm PacketEvents 2.13.0 or later is installed and enabled first. On Minecraft 26.3, PacketEvents must be 2.14.0 or later. Check that the server and Java versions match the support table. |
| The stick does nothing | Hold a plugin-issued stick in the main hand; verify `debugstickpro.use`, world lists, block filters, and region protection. |
| Copy or Freeze mode is skipped | Grant `debugstickpro.mode.copy` or `debugstickpro.mode.freeze`. Grant `debugstickpro.mode` as well when the player uses the mode command. |
| A property is missing | Check `BlockDataFilter`, its per-type bypass permission, and `AllowUnsafeBisectedData`. Some properties are intentionally unavailable for safety. |
Expand All @@ -239,6 +241,11 @@ versions also run in-game command, item, display, locale, and mode tests. Spigot
protocol checkpoints are tested separately with the official BuildTools. Paper
remains the primary platform.

Because PacketEvents only publishes its unshaded modules, the runtime tests
reassemble the installable PacketEvents plugin JAR from the same artifacts the
official release is built from (`integration/packetevents`). Set
`DSP_E2E_PACKETEVENTS_VERSION` to test a different PacketEvents version.

## Building from source

Building requires JDK 25; the produced plugin JAR targets Java 17.
Expand Down
18 changes: 12 additions & 6 deletions integration/mineflayer/run-server-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ readonly TEMP_DIR="$(mktemp -d)"
readonly SERVER_DIR="${TEMP_DIR}/server"
readonly CACHE_DIR="${DSP_E2E_CACHE:-${HOME}/.cache/debugstickpro-e2e}"
readonly SERVER_JAR="${DSP_E2E_SERVER_JAR:-${CACHE_DIR}/${PLATFORM}-${MINECRAFT_VERSION}.jar}"
readonly PACKETEVENTS_JAR="${CACHE_DIR}/packetevents-spigot-2.13.0.jar"
readonly PACKETEVENTS_URL="https://github.com/retrooper/packetevents/releases/download/v2.13.0/packetevents-spigot-2.13.0.jar"
readonly PACKETEVENTS_SHA256="6d9ece0d87ee727a79a20b7ffbd432021609c6f52bafcb654fc2d3e9b6f064c5"
readonly PACKETEVENTS_VERSION="${DSP_E2E_PACKETEVENTS_VERSION:-2.14.0-SNAPSHOT}"
readonly PACKETEVENTS_JAR="${CACHE_DIR}/packetevents-spigot-${PACKETEVENTS_VERSION}.jar"
readonly PACKETEVENTS_FIXTURE="${PROJECT_DIR}/integration/packetevents/pom.xml"
SERVER_PID=""

cleanup() {
Expand Down Expand Up @@ -58,10 +58,16 @@ else
echo "${server_sha256} ${SERVER_JAR}" | sha256sum --check --status
fi

if [[ ! -f "${PACKETEVENTS_JAR}" ]] || ! echo "${PACKETEVENTS_SHA256} ${PACKETEVENTS_JAR}" | sha256sum --check --status; then
curl --fail --silent --show-error --location "${PACKETEVENTS_URL}" --output "${PACKETEVENTS_JAR}"
if [[ ! -f "${PACKETEVENTS_JAR}" ]]; then
# PacketEvents only publishes its unshaded modules, so the installable plugin
# JAR is reassembled from the same artifacts the official release uses.
mvn -B -q -f "${PACKETEVENTS_FIXTURE}" \
-Dpacketevents.version="${PACKETEVENTS_VERSION}" \
-Doutput.jar="${TEMP_DIR}/packetevents.jar" \
package
unzip -l "${TEMP_DIR}/packetevents.jar" plugin.yml >/dev/null
mv "${TEMP_DIR}/packetevents.jar" "${PACKETEVENTS_JAR}"
fi
echo "${PACKETEVENTS_SHA256} ${PACKETEVENTS_JAR}" | sha256sum --check --status

find_plugin_jars() {
find "${PROJECT_DIR}/target" -maxdepth 1 -type f \
Expand Down
92 changes: 92 additions & 0 deletions integration/packetevents/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?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>dev.twme.debugstickpro.integration</groupId>
<artifactId>packetevents-plugin</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>

<name>DebugStickPro PacketEvents test fixture</name>

<description>
Builds the installable PacketEvents plugin JAR used by the server
integration tests. PacketEvents only publishes its unshaded modules to
CodeMC, so the shaded JAR that a server installs is reassembled here
from the same artifacts the official release is built from.
</description>

<properties>
<packetevents.version>2.14.0-SNAPSHOT</packetevents.version>
<output.jar>${project.build.directory}/packetevents-plugin.jar</output.jar>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<repositories>
<repository>
<id>codemc-releases</id>
<url>https://repo.codemc.io/repository/maven-releases/</url>
</repository>
<repository>
<id>codemc-snapshots</id>
<url>https://repo.codemc.io/repository/maven-snapshots/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.github.retrooper</groupId>
<artifactId>packetevents-spigot</artifactId>
<version>${packetevents.version}</version>
<exclusions>
<!-- The server supplies Netty, and the official release JAR does
not bundle it either. -->
<exclusion>
<groupId>io.netty</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<outputFile>${output.jar}</outputFile>
<createDependencyReducedPom>false</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
<exclude>module-info.class</exclude>
<exclude>META-INF/versions/*/module-info.class</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@

<groupId>dev.twme</groupId>
<artifactId>DebugStickPro</artifactId>
<version>0.5.3</version>
<version>0.5.4</version>
<packaging>jar</packaging>

<name>DebugStickPro</name>

<properties>
<java.version>25</java.version>
<java.release>17</java.release>
<paper.version>26.2.build.112-stable</paper.version>
<paper.version>26.3.build.33-alpha</paper.version>
<adventure.compile.version>5.2.0</adventure.compile.version>
<adventure.runtime.version>4.26.1</adventure.runtime.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -153,7 +153,7 @@
<dependency>
<groupId>com.github.retrooper</groupId>
<artifactId>packetevents-spigot</artifactId>
<version>2.13.0</version>
<version>2.14.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Loading