Skip to content

Instantly share code, notes, and snippets.

@Jo0001
Created April 29, 2024 16:35
Show Gist options
  • Save Jo0001/8b02e2734ef4ae36fba23fb89320a50d to your computer and use it in GitHub Desktop.
Save Jo0001/8b02e2734ef4ae36fba23fb89320a50d to your computer and use it in GitHub Desktop.
Fix Unable to grab ViaVersion client version for player!

If your logs are spammed with Unable to grab ViaVersion client version for player!, that's because the library "packetevents" in one of your plugins is doing something dumb and not ViaVersions fault!

Linux

Download findpacketevents.sh and run it (via the terminal/ssh) in your plugins directory

Windows

Download find-packetevents.ps1 and run it (rightclick → execute with powershell) in your plugin directory

Java Application (platform indipendent)

See https://github.com/Jo0001/FindPacketevents

We are not responsible for any errors...

Add-Type -AssemblyName System.IO.Compression.FileSystem
Write-Host "Checking for plugins using packetevents"
foreach($sourceFile in (Get-ChildItem -filter '*.jar')){
foreach($plContent in [IO.Compression.ZipFile]::OpenRead($sourceFile.FullName).Entries.FullName){
if(($plContent.toString()) -match "packetevents" ){
Write-Host -ForegroundColor Red "Found $($sourceFile)"
break;
}
}
}
Write-Host "Done"
Read-Host -Prompt "Press any key to exit..."
#!/bin/bash
for jar_file in *.jar; do
if unzip -l "$jar_file" | grep -q '^.*packetevents/$'; then
echo "Update/complain to $jar_file"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment