ProtocolLib

3M Downloads

Loaded Class {0} from {1} which is not a depend, soft depend or loadbefore of this plugin.

TheSoraMan opened this issue ยท 12 comments

commented

Describe the bug
I don't know if this classifies as a bug, but it shows OP'd Members this and I don't know how to fix it.

To Reproduce
Steps to reproduce the behavior:

  1. Install a Plugin that needs ProtocolLib to work, in my case PosePlugin
  2. /lay or /sit then stand up using [shift key]
  3. see the prompt

Expected behavior
There will be a prompt that says "[ProtocolLib] Loaded Class {0} from {1} which is not a depend, soft depend or loadbefore of this plugin.

Screenshots
https://prnt.sc/10isrs8

Version Info
ProtocolLib version 4.6.0
https://pastebin.com/5WLYkF2Q

Additional context
I don't know if there's more plugins that makes it show that text.

commented

Same issue... Only on newer minecraft versions

commented

@dmulloy2 Any possibility of adding a filter or option so the verbose output isn't sent to the client? I'm starting to notice it with 1.19.3.

Paper dev 348 https://papermc.io/downloads
ProtocolLib dev 608 (Spigot 1.19.3) https://ci.dmulloy2.net/job/ProtocolLib/

[System] [CHAT] Loaded class {0} from {1} which is not a depend or softdepend of this plugin. is sent to the client on login. It is only sent to the first login of the server start session and only shown if that first logged person is OP / admin ( '*' permission wildcard). Consecutive logins / relogs, the message isn't shown again until the next server restart.

I have no clue what plugin is making the softdepend call but I find it a bit odd the inform message is a login notification to OP (if first login) and doesn't include actual helpful information instead of just being a console load warning.

commented

This message is not send by ProtocolLib but by the spigot plugin class loading stuff. In most cases this indicates that some plugin is shading a class which would normally be provided in runtime by spigot anyway, but given how the class loading in spigot works the other plugin loader is called first leading to the given message (seems like how the message is sent is invalid, therefore the information which should be available through {0} and {1} is not properly replaced).

See: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java#135

commented

This still happens on build 522 so not sure why this was closed, unless it'll be fixed in the future

commented

Warning: I absolutely have no clue how this plugin works, but from the looks of it, it changes just changes the fields.
(Using 1.16.5)
It may be due to the absence of an Integer as the reason in the packet GAME_STATE_CHANGE.
Instead, there is a PacketPlayOutGameStateChange.a field. There are 11 static instances for this class (corresponding to the 11 reasons), that are located in PacketPlayOutGameStateChange. wiki.vg and PacketWrapper both state that it's just an int.
image
When trying to use this Packet, I get this error:
com.comphenix.protocol.reflect.FieldAccessException: No field with type int exists in class PacketPlayOutGameStateChange.
And in the game, I get the exact message that this issue is about.

commented

@DomiRusz24 @PrinceBunBun981 those look like different issues to this one

commented

@DomiRusz24 @PrinceBunBun981 those look like different issues to this one
#1279
Deleted my bad.

commented

@DomiRusz24 @PrinceBunBun981 those look like different issues to this one

I got the same exact message with this error, thought it's related to eachother.

commented

I've had the same issue with my plugin PremiumVanish. In my case it only appeared when I was listening to the GAME_STATE_CHANGE packet type and it doesn't appear when I'm only listening to e.g. PLAYER_INFO, ABILITIES and ENTITY_METADATA.
Here's a ProtocolLib dump with the bug in action.

commented

Have the same problem with my own plugin where I use ProtocolLib to edit NBT-Data.
Error in cosole:
[Server thread/WARN]: [ProtocolLib] Loaded class com.comphenix.protocol.reflect.StructureModifier from Speedrun v1.0 which is not a depend, softdepend or loadbefore of this plugin.
Happens when new NBT-Data is applied to an item.

commented

That message would imply that Speedrun is including ProtocolLib classes in its jar, which it shouldn't be doing

commented

I should have included the message I get in the console:
[00:08:06] [Server thread/WARN]: [ProtocolLib] Loaded class de.myzelyam.premiumvanish.bukkit.features.SilentOpenChestPacketAdapter from PremiumVanish v2.6.11 which is not a depend, softdepend or loadbefore of this plugin.
It appears that ProtocolLib loaded the class that contains the GAME_STATE_CHANGE packet adapter. I'm not including ProtocolLib in my plugin jar.