-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "Invalid payload REGISTER" error when login (#1319)
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...ht-common/src/main/java/io/izzel/arclight/common/mixin/bukkit/StandardMessengerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters