mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Fix sending BlockPermissions packet when changing rank, even if client doesn't indicate support for it
This commit is contained in:
parent
f10952091e
commit
b791a24673
@ -54,8 +54,7 @@ namespace MCGalaxy.Core {
|
||||
if (p.HasCpeExt(CpeExt.EnvColors))
|
||||
p.SendCurrentEnvColors();
|
||||
p.SendCurrentMapAppearance();
|
||||
if (p.HasCpeExt(CpeExt.BlockPermissions))
|
||||
p.SendCurrentBlockPermissions();
|
||||
p.SendCurrentBlockPermissions();
|
||||
|
||||
if (!level.Config.Guns && p.aiming) {
|
||||
p.aiming = false;
|
||||
|
@ -428,7 +428,6 @@ namespace MCGalaxy {
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
foreach (Player p in players) {
|
||||
if (p.level != this) continue;
|
||||
if (!p.HasCpeExt(CpeExt.BlockPermissions)) continue;
|
||||
p.SendCurrentBlockPermissions();
|
||||
}
|
||||
}
|
||||
|
@ -202,6 +202,8 @@ namespace MCGalaxy {
|
||||
}
|
||||
|
||||
public void SendCurrentBlockPermissions() {
|
||||
if (!HasCpeExt(CpeExt.BlockPermissions)) return;
|
||||
|
||||
// Write the block permissions as one bulk TCP packet
|
||||
int count = NumBlockPermissions();
|
||||
byte[] bulk = new byte[4 * count];
|
||||
|
Loading…
x
Reference in New Issue
Block a user