Skip to content

Commit

Permalink
Fix "Invalid payload REGISTER" error when login (#1319)
Browse files Browse the repository at this point in the history
  • Loading branch information
hank9999 authored May 1, 2024
1 parent e393a7a commit 5c6b795
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"PluginClassLoaderMixin",
"PotionEffectTypeMixin",
"RecipeIteratorMixin",
"StandardMessengerMixin",
"WatchdogThreadMixin"
]
}

0 comments on commit 5c6b795

Please sign in to comment.