Add some small debug for refcount issues with plugin messages.
This commit is contained in:
@@ -63,6 +63,12 @@ public class PluginMessage extends DeferredByteBufHolder implements MinecraftPac
|
||||
if (channel == null) {
|
||||
throw new IllegalStateException("Channel is not specified.");
|
||||
}
|
||||
|
||||
if (refCnt() == 0) {
|
||||
throw new IllegalStateException("Plugin message contents for " + this.channel
|
||||
+ " freed too many times.");
|
||||
}
|
||||
|
||||
if (version.compareTo(ProtocolVersion.MINECRAFT_1_13) >= 0) {
|
||||
ProtocolUtils.writeString(buf, transformLegacyToModernChannel(this.channel));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user