
This plugin prevents client and server side totem ghosting. it will decrease the ghosting amount a lot.
Lightweight Paper plugin that prevents death by consuming a Totem of Undying and applying safe effects.
This repository contains a small Minecraft Paper plugin written in Java. The plugin listens for lethal damage and consumes a Totem of Undying (main/off-hand) to keep the player alive while playing the totem effects.
Key files:
src/main/java/.../Antighost.java - plugin main classsrc/main/java/.../listeners/TotemListener.java - main listener implementationsrc/main/resources/paper-plugin.yml - Paper plugin descriptor (will be packaged into the JAR)build.gradle - Gradle build configurationbuild.gradle; ensure your toolchain supports it)./gradlew on Unix or . gradlew.bat on Windows)From the project root (Windows PowerShell):
# Clean and build the plugin
.\gradlew.bat --no-daemon clean build
After a successful build the plugin JAR will be in build/libs/ (for example build/libs/antighost-1.0-SNAPSHOT.jar).
Modrinth (and Paper) requires a plugin.yml or paper-plugin.yml at the root of the plugin JAR. If Modrinth gives the error "No plugin.yml or paper-plugin.yml present for plugin file" the YAML is missing from the artifact.
Use one of these commands in PowerShell to check the contents of the built JAR:
# Find the latest built jar
$jar = Get-ChildItem .\build\libs\*.jar | Select-Object -Last 1 -ExpandProperty FullName
# List entries and search for plugin descriptor names
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::OpenRead($jar).Entries | Select-Object -ExpandProperty FullName | Where-Object { $_ -match 'plugin.yml|paper-plugin.yml' }
If the command prints paper-plugin.yml (or plugin.yml), it is present. It must appear at the root of the JAR (the entry name should be exactly paper-plugin.yml or plugin.yml).
Alternative (using jar if available):
& 'C:\Program Files\Java\jdk-21\bin\jar.exe' tf build\libs\antighost-1.0-SNAPSHOT.jar | Select-String 'paper-plugin.yml|plugin.yml'
src/main/resources/paper-plugin.yml (or plugin.yml).build.gradle customizations: check for sourceSets overrides that exclude src/main/resources or processResources filters that unintentionally exclude *.yml.shadowJar) and that the shading configuration includes sourceSets.main.output so resources are bundled.processResources to expand properties (this project uses it to expand version in paper-plugin.yml), make sure the filesMatching('paper-plugin.yml') block is correct and not excluding the file.Example Gradle hints (Groovy DSL):
sourceSets {
main {
resources.srcDirs = ['src/main/resources']
}
}
jar {
from(sourceSets.main.output)
}
shadowJar {
from(sourceSets.main.output)
}
tasks.build.dependsOn shadowJar
paper-plugin.yml exists at src/main/resources.. gradlew.bat --no-daemon clean build.build.gradle for processResources, sourceSets, jar, or shadowJar blocks.. gradlew.bat --no-daemon clean build --info and the JAR listing command output.MIT
If you'd like, I can also add a small CI workflow that builds the jar and checks the JAR contains paper-plugin.yml automatically on push.