Buggy code:
public class LWCBlockListener extends BlockListener { private LWCPlugin plugin ; public LWCBlockListener ( LWCPlugin plugin ) { } @ Override public void onBlockRedstoneChange ( BlockRedstoneEvent event ) { } @ Override public void onSignChange ( SignChangeEvent event ) { } @ Override public void onBlockBreak ( BlockBreakEvent event ) { } @ Override public void onBlockPistonRetract ( BlockPistonRetractEvent event ) { } @ Override public void onBlockPistonExtend ( BlockPistonExtendEvent event ) { } @ Override public void onBlockPlace ( BlockPlaceEvent event ) { if ( ( ! ( LWC . ENABLED ) ) || ( event . isCancelled ( ) ) ) { return ; } LWC lwc = plugin . getLWC ( ) ; Player player = event . getPlayer ( ) ; Block block = event . getBlockPlaced ( ) ; if ( ! ( lwc . isProtectable ( block ) ) ) { return ; } String autoRegisterType = plugin . getLWC ( ) . resolveProtectionConfiguration ( block . getType ( ) , "autoRegister" ) ; <START_BUG> if ( ( ( ! ( lwc . hasPermission ( player , "lwc.autoprotect" ) ) ) && ( ! ( autoRegisterType . equalsIgnoreCase ( "private" ) ) ) ) && ( ! ( autoRegisterType . equalsIgnoreCase ( "public" ) ) ) ) { <END_BUG> return ; } if ( ! ( lwc . hasPermission ( player , ( "lwc.create." + autoRegisterType ) , "lwc.create" , "lwc.protect" ) ) ) { return ; } if ( ( lwc . hasPermission ( player , "lwc.autoprotect" ) ) && ( ! ( ( lwc . getPermissions ( ) ) instanceof NijiPermissions ) ) ) { autoRegisterType = "private" ; } Protection . Type type = null ; try { type = Type . valueOf ( autoRegisterType . toUpperCase ( ) ) ; } catch ( IllegalArgumentException e ) { return ; } if ( type == null ) { player . sendMessage ( ( ( Colors . Red ) + "LWC_INVALID_CONFIG_autoRegister" ) ) ; return ; } if ( ( block . getType ( ) ) == ( Material . CHEST ) ) { BlockFace [ ] faces = new BlockFace [ ] { BlockFace . NORTH , BlockFace . SOUTH , BlockFace . EAST , BlockFace . WEST } ; for ( BlockFace blockFace : faces ) { Block face = block . getRelative ( blockFace ) ; if ( ( face . getType ( ) ) == ( Material . CHEST ) ) { if ( ( lwc . getPhysicalDatabase ( ) . loadProtection ( face . getWorld ( ) . getName ( ) , face . getX ( ) , face . getY ( ) , face . getZ ( ) ) ) != null ) { return ; } } } } try { LWCProtectionRegisterEvent evt = new LWCProtectionRegisterEvent ( player , block ) ; lwc . getModuleLoader ( ) . dispatchEvent ( evt ) ; if ( evt . isCancelled ( ) ) { return ; } Protection protection = lwc . getPhysicalDatabase ( ) . registerProtection ( block . getTypeId ( ) , type , block . getWorld ( ) . getName ( ) , player . getName ( ) , "" , block . getX ( ) , block . getY ( ) , block . getZ ( ) ) ; lwc . sendLocale ( player , "protection.onplace.create.finalize" , "type" , lwc . getLocale ( autoRegisterType . toLowerCase ( ) ) , "block" , LWC . materialToString ( block ) ) ; if ( protection != null ) { lwc . getModuleLoader ( ) . dispatchEvent ( new com . griefcraft . scripting . event . LWCProtectionRegistrationPostEvent ( protection ) ) ; } } catch ( Exception e ) { lwc . sendLocale ( player , "protection.internalerror" , "id" , "PLAYER_INTERACT" ) ; e . printStackTrace ( ) ; } } }

Fix:
if ( ( ! ( autoRegisterType . equalsIgnoreCase ( "private" ) ) ) && ( ! ( autoRegisterType . equalsIgnoreCase ( "public" ) ) ) ) {