Fix "Invalid payload REGISTER" error when login (#1319)
Some checks failed
Build / build (push) Failing after 33m59s

This commit is contained in:
hank9999 2024-05-01 16:42:05 +08:00
parent 52ab6e5e52
commit 1aa83cca02
No known key found for this signature in database
GPG Key ID: D985035AE32B1004
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,19 @@
package io.izzel.arclight.common.mixin.bukkit;
import org.bukkit.plugin.messaging.Messenger;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
import org.bukkit.plugin.messaging.StandardMessenger;
@Mixin(value=StandardMessenger.class, remap = false)
public abstract class StandardMessengerMixin implements Messenger {
@ModifyConstant(
method = "validateAndCorrectChannel",
constant = @Constant(intValue = Messenger.MAX_CHANNEL_SIZE)
)
private static int modifyMaxChannelSize(int original) {
return 256;
}
}

View File

@ -47,6 +47,7 @@
"PotionEffectTypeMixin",
"RecipeIteratorMixin",
"Registry_SimpleRegistryMixin",
"StandardMessengerMixin",
"WatchdogThreadMixin"
]
}