mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
Fix compliance issue with BlockPermissions (ServerIdentification and SetPermission overriding SetBlockPermissions)
This commit is contained in:
parent
8548159927
commit
2c8535c2ec
@ -23,6 +23,7 @@ namespace ClassicalSharp {
|
|||||||
public bool Disconnected;
|
public bool Disconnected;
|
||||||
bool sendHeldBlock = false;
|
bool sendHeldBlock = false;
|
||||||
bool useMessageTypes = false;
|
bool useMessageTypes = false;
|
||||||
|
bool useBlockPermissions = false;
|
||||||
bool receivedFirstPosition = false;
|
bool receivedFirstPosition = false;
|
||||||
public bool UsingExtPlayerList = false;
|
public bool UsingExtPlayerList = false;
|
||||||
|
|
||||||
@ -286,7 +287,9 @@ namespace ClassicalSharp {
|
|||||||
ServerName = reader.ReadString();
|
ServerName = reader.ReadString();
|
||||||
ServerMotd = reader.ReadString();
|
ServerMotd = reader.ReadString();
|
||||||
byte userType = reader.ReadUInt8();
|
byte userType = reader.ReadUInt8();
|
||||||
|
if( !useBlockPermissions ) {
|
||||||
Window.CanDelete[(int)Block.Bedrock] = userType == 0x64;
|
Window.CanDelete[(int)Block.Bedrock] = userType == 0x64;
|
||||||
|
}
|
||||||
Window.LocalPlayer.UserType = userType;
|
Window.LocalPlayer.UserType = userType;
|
||||||
receivedFirstPosition = false;
|
receivedFirstPosition = false;
|
||||||
Window.LocalPlayer.ParseHackFlags( ServerName, ServerMotd );
|
Window.LocalPlayer.ParseHackFlags( ServerName, ServerMotd );
|
||||||
@ -453,7 +456,9 @@ namespace ClassicalSharp {
|
|||||||
case PacketId.SetPermission:
|
case PacketId.SetPermission:
|
||||||
{
|
{
|
||||||
byte userType = reader.ReadUInt8();
|
byte userType = reader.ReadUInt8();
|
||||||
|
if( !useBlockPermissions ) {
|
||||||
Window.CanDelete[(int)Block.Bedrock] = userType == 0x64;
|
Window.CanDelete[(int)Block.Bedrock] = userType == 0x64;
|
||||||
|
}
|
||||||
Window.LocalPlayer.UserType = userType;
|
Window.LocalPlayer.UserType = userType;
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
@ -475,6 +480,8 @@ namespace ClassicalSharp {
|
|||||||
useMessageTypes = true;
|
useMessageTypes = true;
|
||||||
} else if( extensionName == "ExtPlayerList" ) {
|
} else if( extensionName == "ExtPlayerList" ) {
|
||||||
UsingExtPlayerList = true;
|
UsingExtPlayerList = true;
|
||||||
|
} else if( extensionName == "BlockPermissions" ) {
|
||||||
|
useBlockPermissions = true;
|
||||||
}
|
}
|
||||||
cpeServerExtensionsCount--;
|
cpeServerExtensionsCount--;
|
||||||
if( cpeServerExtensionsCount <= 0 ) {
|
if( cpeServerExtensionsCount <= 0 ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user