Skip to content

Commit

Permalink
Fix "Invalid payload REGISTER" error when login (#1319) (#1339)
Browse files Browse the repository at this point in the history
  • Loading branch information
hank9999 authored May 5, 2024
1 parent 08bffd8 commit 648195c
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 @@ -43,6 +43,7 @@
"PotionTypeMixin",
"RecipeIteratorMixin",
"Registry_SimpleRegistryMixin",
"StandardMessengerMixin",
"WatchdogThreadMixin"
]
}

0 comments on commit 648195c

Please sign in to comment.