You should always be able to place/delete blocks, unless they are overriden by SetBlockPermission. Fixes being unable to /b an lb/gb removed block.

This commit is contained in:
UnknownShadow200 2016-08-21 14:06:29 +10:00
parent 443c520bd0
commit ae379a85c0
2 changed files with 1 additions and 5 deletions

View file

@ -146,7 +146,7 @@ namespace ClassicalSharp {
}
public void SetDefaultBlockPermissions( InventoryPermissions canPlace, InventoryPermissions canDelete ) {
for( int block = Block.Stone; block <= BlockInfo.MaxOriginalBlock; block++ ) {
for( int block = Block.Stone; block <= BlockInfo.MaxDefinedBlock; block++ ) {
canPlace[block] = true;
canDelete[block] = true;
}

View file

@ -110,10 +110,6 @@ namespace ClassicalSharp.Network {
game.UseCPEBlocks = true;
if( supportLevel == 1 ) {
for( int i = BlockInfo.MaxOriginalBlock + 1; i <= BlockInfo.MaxCpeBlock; i++ ) {
game.Inventory.CanPlace[i] = true;
game.Inventory.CanDelete[i] = true;
}
game.Events.RaiseBlockPermissionsChanged();
} else {
Utils.LogDebug( "Server's block support level is {0}, this client only supports level 1.", supportLevel );